mirror of
https://github.com/SukkaW/Surge.git
synced 2026-09-12 18:44:36 +08:00
CI: use env instead of matrix for variable
This commit is contained in:
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@@ -164,10 +164,8 @@ jobs:
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-slim
|
||||||
# matrix is a tricky way to define a variable directly in the action yaml
|
env:
|
||||||
strategy:
|
WRANGLER_VERSION: "3.114.17"
|
||||||
matrix:
|
|
||||||
wranglerVersion: ["3.114.17"]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get NPM cache directory path
|
- name: Get NPM cache directory path
|
||||||
id: npm_cache_path
|
id: npm_cache_path
|
||||||
@@ -178,7 +176,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{ steps.npm_cache_path.outputs.dir }}
|
${{ steps.npm_cache_path.outputs.dir }}
|
||||||
node_modules
|
node_modules
|
||||||
key: deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler-${{ matrix.wranglerVersion }}
|
key: deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler-${{ env.WRANGLER_VERSION }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler-
|
deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler-
|
||||||
- uses: actions/download-artifact@v8
|
- uses: actions/download-artifact@v8
|
||||||
@@ -203,7 +201,7 @@ jobs:
|
|||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy public --project-name=sukkaw-ruleset --commit-dirty=true --branch=main
|
command: pages deploy public --project-name=sukkaw-ruleset --commit-dirty=true --branch=main
|
||||||
wranglerVersion: ${{ matrix.wranglerVersion }}
|
wranglerVersion: ${{ env.WRANGLER_VERSION }}
|
||||||
- name: Upload Dist to GitLab
|
- name: Upload Dist to GitLab
|
||||||
id: deploy_gitlab
|
id: deploy_gitlab
|
||||||
background: true
|
background: true
|
||||||
|
|||||||
Reference in New Issue
Block a user