Skip to content

Deploy

Deploy #83

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
workflow_run:
workflows: ['Tests']
types:
- completed
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install NPM Dependencies
run: npm install
- name: Build
run: |
cp -f .env.production .env
npm run build
npm run build
env:
APP_ENV: production
APP_URL: https://dangibbs.uk
- name: Archive Build
env:
INPUT_PATH: docs/
run: |
tar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
-cvf "$RUNNER_TEMP/build.tar" \
--exclude=.git \
--exclude=.github \
.
- name: Upload artefact
uses: actions/[email protected]
with:
name: github-pages
path: ${{ runner.temp }}/build.tar
retention-days: '1'
deploy:
name: Deploy
runs-on: ubuntu-20.04
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-page
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1