Skip to content

Commit

Permalink
Merge pull request #6 from itskdhere/gh-actions
Browse files Browse the repository at this point in the history
Add GitHub Actions Workflows
  • Loading branch information
itskdhere authored Aug 30, 2024
2 parents 7541530 + 237a16e commit 4046b93
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/cf-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Cloudflare Pages Deployment

on:
push:
branches:
- main

jobs:
cf:
name: Build & Deploy
runs-on: ubuntu-latest

permissions:
contents: read
deployments: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: zeroday-alliance
directory: dist
26 changes: 26 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Linter

on:
push:
branches-ignore:
- main

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies
run: npm ci

- name: Lint
run: npm run lint

0 comments on commit 4046b93

Please sign in to comment.