fetch artifact items #194
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: Publish UI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
env: | |
NEXT_PUBLIC_BASE_URL: ${{ secrets.PROD_API_URL }} | |
NEXT_PUBLIC_CHAT_URL: https://chrisinajar.com:2096/ | |
steps: | |
- name: Allow setting envs | |
run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: install dependencies | |
run: | | |
npm install --global yarn | |
yarn | |
- name: graphql codegen | |
env: | |
NEXT_PUBLIC_BASE_URL: ${{ secrets.PROD_API_URL }} | |
run: | | |
yarn generate | |
- name: build project | |
run: | | |
yarn build | |
touch out/.nojekyll | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4.2.5 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: out # The folder the action should deploy. | |
- name: Send deploy notification | |
run: | | |
curl https://chrisinajar.com:8443/external-api/github-ui-release -H "Authorization: ${{ secrets.DEPLOY_SECRET }}" |