Deploy after testing #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 after testing | |
on: | |
workflow_run: | |
workflows: [ 'Test on branch push' ] | |
branches: [ develop ] | |
types: | |
- completed | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
env: | |
NODE_ENV: 'PROD' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: sudo apt-get install -y libappindicator1 fonts-liberation ruby-full python3-pip | |
- run: sudo pip install mkdocs | |
- run: | | |
yarn config set unsafe-disable-integrity-migration true -g | |
yarn install --ignore-engines --frozen-lockfile --non-interactive | |
- run: yarn run wp:build && yarn run openstudio-build && sed -i 's/\/static/static/g' dist/index.html | |
- run: mkdocs build -d dist/docs | |
- run: cp -r icons/ dist/ && cp site.webmanifest dist/ && cp browserconfig.xml dist/ | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: dist # The folder the action should deploy. |