Skip to content

Commit

Permalink
Upload to Cloudflare pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vycius committed Jul 18, 2024
1 parent 847c0e5 commit 7353822
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
name: Validate if docker image builds
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -43,6 +45,8 @@ jobs:
name: Generate ReDoc
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -73,11 +77,22 @@ jobs:
path: openapi.json
if-no-files-found: error


- name: Upload redoc-static.html artifact
uses: actions/upload-artifact@v4
with:
name: redoc-static.html
path: redoc-static.html
if-no-files-found: error

- name: Create dist folder with files
run: |
mkdir dist
cp redoc-static.html dist/index.html
cp openapi.yaml openapi.json dist
- name: Upload to Cloudflare pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=national-boundaries-api

0 comments on commit 7353822

Please sign in to comment.