Skip to content

publish-event

publish-event #1090

Workflow file for this run

name: deploy
on:
schedule:
- cron: '0 0 * * *' # Every day at 00:00
push:
branches:
- master
repository_dispatch:
types: [publish-event]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm 9
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'pnpm'
- name: Get dotenv secrets
run: |
touch .env
echo NUXT_BASE_URL = ${{ secrets.NUXT_BASE_URL }} >> .env
echo NUXT_CTF_SPACE_ID = ${{ secrets.NUXT_CTF_SPACE_ID }} >> .env
echo NUXT_CTF_CDA_ACCESS_TOKEN = ${{ secrets.NUXT_CTF_CDA_ACCESS_TOKEN }} >> .env
- name: Clean install Node dependencies
run: pnpm i --frozen-lockfile
- name: Generate files
run: pnpm run generate
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
- name: Keep workflow alive
uses: gautamkrishnar/keepalive-workflow@master