Add service repos for kubernetes deployments (#6) #120
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: Build and deploy docs | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
release: | |
types: | |
- published | |
env: | |
VERSION_PATH: / | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Update VERSION_PATH | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: echo VERSION_PATH=/version/$(echo $GITHUB_REF | cut -d / -f 3 | cut -d v -f 2- | cut -d . -f 1,2)/ >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v2.3.1 | |
with: | |
persist-credentials: false | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install and Build 🔧 | |
run: | | |
cd docs | |
yarn install | |
yarn build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@3.7.1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: github-pages # The branch the action should deploy to | |
FOLDER: docs/.vuepress/dist # The folder the action should deploy | |
TARGET_FOLDER: ${{ env.VERSION_PATH }} | |
CLEAN: true # Automatically remove deleted files from the deploy branch | |
CLEAN_EXCLUDE: '["version"]' |