Merge pull request #46 from kvii/pr-kratos-link #272
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: Deployment | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
version: 12.x | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn docs:build | |
- name: scp | |
env: | |
host: '[email protected]' | |
dest: '/data/dtm-docs/' | |
run: | | |
echo "${{secrets.DEPLOY_KEY}}" > deploy_key | |
chmod 600 ./deploy_key | |
cd docs/.vitepress | |
tar -cvzf dist.tar.gz dist | |
scp -i ../../deploy_key -o StrictHostKeyChecking=no dist.tar.gz ${{env.host}}:${{env.dest}} | |
ssh -i ../../deploy_key -o StrictHostKeyChecking=no ${{env.host}} 'cd ${{env.dest}} && rm -rf dist && tar -zvxf dist.tar.gz' |