Version 1.0.0-rc1 - Pipeline
Some checks failed
Frontend Deployment Pipeline / deploy-frontend (push) Failing after 28s
Some checks failed
Frontend Deployment Pipeline / deploy-frontend (push) Failing after 28s
This commit is contained in:
45
.gitea/workflows/deploy.yml
Normal file
45
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Frontend Deployment Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-frontend:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
eval "$(ssh-agent -s)"
|
||||||
|
ssh-add ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan git.raphix.fr >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Build Frontend
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Deploy Frontend
|
||||||
|
run: |
|
||||||
|
scp -r dist/* raphix@alpha:/home/gitlab-ci/frontend/dist/
|
||||||
|
ssh -o StrictHostKeyChecking=no raphix@alpha << 'EOF'
|
||||||
|
sudo su - gitlab-ci -c '
|
||||||
|
set -e
|
||||||
|
echo "[Frontend-Deploy] - Stage - Déploiement - START"
|
||||||
|
|
||||||
|
# Assure les permissions
|
||||||
|
chown -R gitlab-ci:gitlab-ci /home/gitlab-ci/frontend/dist
|
||||||
|
|
||||||
|
echo "[Frontend-Deploy] - Stage - Déploiement - END"
|
||||||
|
'
|
||||||
|
EOF
|
Reference in New Issue
Block a user