Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Oct 10, 2023
1 parent 01a7fcc commit 7102a90
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node 19.x
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Setup Node LTS
uses: actions/setup-node@v3
with:
node-version: '19.x'
node-version: 'lts'
- name: Install dependencies with a clean slate
run: npm ci
- name: Run tests
Expand Down
48 changes: 23 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,26 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Navigate to repo
run: cd $GITHUB_WORKSPACE
- uses: actions/setup-node@v1
with:
node-version: '19.x'
- name: Install deps
run: npm ci
- name: Build site
run: npm run build
- name: Build Workers script
run: npm run build-worker
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Wrangler auth check
run: npm run wrangler-whoami
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Upload assets
run: npm run deploy-worker
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 'lts'
- name: Install deps
run: npm ci
- name: Build site
run: npm run build
- name: Build Workers script
run: npm run build-worker
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Wrangler auth check
run: npm run wrangler-whoami
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Upload assets
run: npm run deploy-worker
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}

0 comments on commit 7102a90

Please sign in to comment.