Skip to content

Commit 18ef33a

Browse files
ksen0limzykenneth
andauthored
Add beta website deployment action (#733)
* Update deploy.yml * Update and rename deploy.yml to staging_deploy.yml * Update staging_deploy.yml * Remove GitHub Actions step timeout * Update staging_deploy.yml * Update staging_deploy.yml * Update beta_deploy.yml * Update and rename staging_deploy.yml to beta_deploy.yml * Add files via upload --------- Co-authored-by: Kenneth Lim <[email protected]>
1 parent fcf9ba8 commit 18ef33a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/beta_deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy beta to Netlify
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: ["2.0"]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build-deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
22+
- name: Checkout your repository using git
23+
uses: actions/checkout@v4
24+
25+
- name: Install, build, and upload your site output
26+
env:
27+
NODE_OPTIONS: "--max_old_space_size=4096"
28+
uses: withastro/action@v2
29+
30+
- name: Deploy to Netlify
31+
uses: nwtgck/[email protected]
32+
with:
33+
publish-dir: './dist'
34+
production-branch: main
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
deploy-message: "Deploy from GitHub Actions"
37+
enable-pull-request-comment: false
38+
enable-commit-comment: false
39+
overwrites-pull-request-comment: false
40+
env:
41+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
42+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

0 commit comments

Comments
 (0)