deploy prod #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy prod | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy-prod: | |
name: ${{ matrix.step }} | |
runs-on: ubuntu-latest | |
environment: master | |
env: | |
YARN_ENABLE_SCRIPTS: false | |
GH_PAT: ${{ secrets.GH_PAT }} | |
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: "yarn" | |
- name: install deps | |
run: | | |
yarn install | |
- name: build | |
run: | | |
yarn build | |
- name: deploy prod | |
uses: appleboy/scp-action@master | |
with: | |
username: ubuntu | |
host: ${{ secrets.HOST }} | |
port: 22 | |
key: ${{ secrets.KEY }} | |
source: ${{ github.workspace }}/dist | |
target: "/home/ubuntu/zkmaze" | |
strip_components: 3 | |
rm: true |