Probando almacenamiento de artefactos
This commit is contained in:
@@ -2,14 +2,45 @@ name: CD for startPage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
||||
- name: Run build step
|
||||
run: ./build.sh
|
||||
|
||||
- name: Store build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: public/
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
|
||||
#
|
||||
# run: |
|
||||
# echo "${{ secrets.SERVER_PRIVATE_KEY }}" > private_key && chmod 600 private_key
|
||||
# ssh -i private_key ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT || 22 }} '
|
||||
# cd /home/ubuntu/CounterApp &&
|
||||
# git checkout master &&
|
||||
# git fetch --all &&
|
||||
# git reset --hard origin/master &&
|
||||
# git pull origin master &&
|
||||
# docker-compose -f docker-compose.prod.yml up -d --build
|
||||
# '
|
||||
|
||||
Reference in New Issue
Block a user