feat: add separate action for PRs vs pushes to main
All checks were successful
Build and Deploy Staging / build_and_deploy (pull_request) Successful in 2m22s
All checks were successful
Build and Deploy Staging / build_and_deploy (pull_request) Successful in 2m22s
This commit is contained in:
parent
e7df33f43c
commit
152293bbe4
2 changed files with 39 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
name: Build and Deploy
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_and_deploy:
|
||||
|
|
35
.forgejo/workflows/pr.yml
Normal file
35
.forgejo/workflows/pr.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Build and Deploy Staging
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_and_deploy:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Clean
|
||||
run: npm run clean
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build the website
|
||||
env:
|
||||
DARK_VISITORS_ACCESS_TOKEN: "${{ secrets.DARK_VISITORS_ACCESS_TOKEN }}"
|
||||
URL: "${{ secrets.STAGING_URL }}"
|
||||
run: npm run build
|
||||
|
||||
- name: Upload build
|
||||
env:
|
||||
BUNNY_ACCESS_KEY: "${{ secrets.STAGING_BUNNY_ACCESS_KEY }}"
|
||||
BUNNY_STORAGE_ZONE_NAME: "${{ secrets.STAGING_BUNNY_STORAGE_ZONE_NAME }}"
|
||||
run: npm run upload
|
Loading…
Add table
Add a link
Reference in a new issue