Skip to content

Commit

Permalink
update CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
huynhdh committed May 6, 2024
1 parent f1e1107 commit 7e32d99
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ name: CI/CD
on:
push:
branches: [ main ]

pull_request:
branches: [ main ]

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,21 +29,19 @@ jobs:
- name: Build
run: npm run build

- uses: actions/upload-artifact@v4
with:
name: dist-artifact
path: dist/*
deploy:
runs-on: ubuntu-latest
needs: [ build ]
environment: Development
steps:
- name: echo
run: echo ${{ vars.DO_HOST }}

- uses: actions/download-artifact@v4
with:
name: dist-artifact
path: distfiles

- name: copy file via ssh password
uses: appleboy/[email protected]
with:
host: ${{ secrets.DO_HOST }}
username: ${{ secrets.DO_USERNAME }}
password: ${{ secrets.DO_PASSWORD }}
source: "distfiles/*"
target: "~/"
- name: copy file via ssh password
uses: appleboy/[email protected]
with:
host: ${{ vars.DO_HOST }}
username: ${{ vars.DO_USERNAME }}
password: ${{ vars.DO_PASSWORD }}
source: "dist/*"
target: "~/"

0 comments on commit 7e32d99

Please sign in to comment.