Fix file upload in root folder #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Setup R2-Explorer | |
env: | |
R2EXPLORER_WORKER_NAME: ${{ vars.R2EXPLORER_WORKER_NAME }} | |
R2EXPLORER_CONFIG: ${{ vars.R2EXPLORER_CONFIG }} | |
R2EXPLORER_BUCKETS: ${{ vars.R2EXPLORER_BUCKETS }} | |
R2EXPLORER_DOMAIN: ${{ vars.R2EXPLORER_DOMAIN }} | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
run: node packages/github-action/prepareDeploy.js | |
- name: Get latest version | |
run: cd packages/github-action && npm install && npm install --save r2-explorer@latest | |
- name: Deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
workingDirectory: "packages/github-action" |