Skip to content

Merge pull request #1866 from codatio/feat/k8s-deployment #6

Merge pull request #1866 from codatio/feat/k8s-deployment

Merge pull request #1866 from codatio/feat/k8s-deployment #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# Images are Git LFS-tracked (.gitattributes); without this the
# build ships LFS pointer files instead of the actual binaries
lfs: true
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
# The repo .npmrc is credential-less (the K8s image build authenticates
# via ADO npmAuthenticate); GH-hosted builds inject creds here instead.
- name: Authenticate to codat-npm feed
run: |
{
echo "//pkgs.dev.azure.com/codat/Codat/_packaging/codat-npm/npm/registry/:username=codat"
echo "//pkgs.dev.azure.com/codat/Codat/_packaging/codat-npm/npm/registry/:_password=${NPM_TOKEN}"
echo "//pkgs.dev.azure.com/codat/Codat/_packaging/codat-npm/npm/registry/:email=npm-requires-email@example.com"
} >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build site
run: npm run build
env:
ZENDESK_KEY: ${{ secrets.ZENDESK_KEY }}
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
GTM_ID: ${{ vars.GTM_ID }}
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: build
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5