Merge pull request #118 from CC11001100/main #168
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: Production workflow | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- README.md | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '12.22.1' | |
- run: | | |
sed -i 's/VSSUECLIENTID/${{ secrets.VSSUECLIENTID }}/g' docs/.vuepress/config.js | |
sed -i 's/VSSUECLIENTSECRET/${{ secrets.VSSUECLIENTSECRET }}/g' docs/.vuepress/config.js | |
yarn install | |
yarn docs:build | |
cp LICENSE docs/.vuepress/dist/ | |
cp robots.txt docs/.vuepress/dist/ | |
- name: Deploy to netlify | |
uses: netlify/actions/cli@master | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.PROD_NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
with: | |
args: deploy --dir=docs/.vuepress/dist --prod |