deploy #1128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.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 |