Skip to content

deploy

deploy #627

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@v3
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: Install npm 9
run: npm i -g npm@9
- name: Get dotenv secrets
run: |
touch .env
echo NUXT_BASE_URL = ${{ secrets.NUXT_BASE_URL }} >> .env
echo NUXT_GOOGLE_ANALYTICS_ID = ${{ secrets.NUXT_GOOGLE_ANALYTICS_ID }} >> .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: npm ci --no-audit
- name: Generate files
run: npm 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