Skip to content

Commit

Permalink
ci: deploy via pages
Browse files Browse the repository at this point in the history
  • Loading branch information
saulhardman committed Dec 1, 2024
1 parent 52ae2c6 commit ffababe
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 91 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Install Dependencies
uses: bahmutov/npm-install@v1
- name: Install Dependencies
uses: bahmutov/npm-install@v1

- name: Lint Source Files
run: yarn lint
- name: Lint Source Files
run: yarn lint

- name: Run Static Site Generator (Production)
run: yarn build
env:
NODE_ENV: production
- name: Run Static Site Generator (Production)
run: yarn build
env:
NODE_ENV: production

- name: Deploy to Cloudflare (Production)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler deploy --env production
- name: Deploy to Cloudflare (Production)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler pages deploy dist
- name: Update Internet Archive
uses: ./.github/actions/auto-archive
- name: Update Internet Archive
uses: ./.github/actions/auto-archive

- name: Commit Internet Archive Manifest
uses: EndBug/add-and-commit@v4
with:
message: 'chore(CI): update internet archive manifest'
add: internet-archive.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit Internet Archive Manifest
uses: EndBug/add-and-commit@v4
with:
message: 'chore(CI): update internet archive manifest'
add: internet-archive.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56 changes: 28 additions & 28 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy (Production)

on:
schedule:
- cron: "0 23 * * *"
- cron: '0 23 * * *'

jobs:
build:
Expand All @@ -20,30 +20,30 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v2

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Install Dependencies
uses: bahmutov/npm-install@v1

- name: Run Static Site Generator (Production)
run: yarn build
env:
NODE_ENV: production

- name: Deploy to Cloudflare (Production)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler deploy --env production
- uses: actions/checkout@v2

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Install Dependencies
uses: bahmutov/npm-install@v1

- name: Run Static Site Generator (Production)
run: yarn build
env:
NODE_ENV: production

- name: Deploy to Cloudflare (Production)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler pages deploy dist
60 changes: 30 additions & 30 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v2

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Install Dependencies
uses: bahmutov/npm-install@v1

- name: Lint Source Files
run: yarn lint

- name: Run Static Site Generator (Staging)
run: yarn build
env:
NODE_ENV: production

- name: Deploy to Cloudflare (Staging)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler deploy --env staging
- uses: actions/checkout@v2

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Install Dependencies
uses: bahmutov/npm-install@v1

- name: Lint Source Files
run: yarn lint

- name: Run Static Site Generator (Staging)
run: yarn build
env:
NODE_ENV: production

- name: Deploy to Cloudflare (Staging)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler pages deploy dist --branch=staging

0 comments on commit ffababe

Please sign in to comment.