Skip to content

Build Code

Build Code #33

Workflow file for this run

name: Build
run-name: Build Code
on:
workflow_dispatch:
push:
branches: ['main']
permissions:
contents: write
concurrency:
group: 'build'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Add env vars
run: |
echo -n 'VITE_DISCORD_MESSAGE_WEBHOOK=' > .env
echo '${{ secrets.DISCORD_MESSAGE_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
echo >> .env
echo -n 'VITE_DISCORD_BLOG_WEBHOOK=' >> .env
echo '${{ secrets.DISCORD_BLOG_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
echo >> .env
echo -n 'VITE_DISCORD_COMMUNITY_WEBHOOK=' >> .env
echo '${{ secrets.DISCORD_COMMUNITY_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
echo >> .env
echo -n 'VITE_DISCORD_FEEDBACK_WEBHOOK=' >> .env
echo '${{ secrets.DISCORD_FEEDBACK_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
- name: Build App
run: |
npm ci
npm run build
cd .vitepress/dist
touch .nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .vitepress/dist # The folder the action should deploy.