fix: provide environment variables for build #3
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 to Cloudflare Pages | |
on: | |
push: | |
branches: rewrite | |
jobs: | |
build_site: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build site | |
env: | |
DEVELOPER_ROLE_ID: 1108300960893251685 | |
WRITER_ROLE_ID: 1108300666658627605 | |
GUILD_ID: 1076617537355251832 | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
run: | | |
pnpm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 2604d9d303c7a3e9c9b923c3f05e0bb9 | |
projectName: mod-magazine | |
directory: build | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
wranglerVersion: '3' |