Skip to content

more seo

more seo #541

Workflow file for this run

name: Deploy to Github Pages
on:
push:
branches:
- 'pages'
env:
TARGET_DIR: dist/analog/public
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Set environment variable based on branch
run: |
if [[ $GITHUB_REF == refs/heads/pages ]]; then
echo "Branch is main or master. Setting DRY_RUN_OPTION to empty."
echo "DRY_RUN_OPTION=" >> $GITHUB_ENV
else
echo "Branch is not main or master. Setting DRY_RUN_OPTION to '--dry-run'."
echo "DRY_RUN_OPTION=--dry-run" >> $GITHUB_ENV
fi
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Deploy Website (gh-pages branch)
env:
GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} # A token must be created to be able to deploy on the gh-pages branch
CNAME_OPTION: --cname=race.elementfuture.com # omit if your not running it on a custom domain
run: |
echo "DRY_RUN_OPTION=$DRY_RUN_OPTION"
git config user.email "reinierklarenberg@gmail.com"
git config user.name "Reinier Klarenberg"
npx angular-cli-ghpages --no-silent --dir="${{env.TARGET_DIR}}" $CNAME_OPTION $DRY_RUN_OPTION