Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
Cf pages (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfrg committed Feb 10, 2024
1 parent c95f6e2 commit d1085b7
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 120 deletions.
5 changes: 0 additions & 5 deletions .firebaserc

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/deploy-cf-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: deploy-cf-pages

on:
workflow_call:
secrets:
CLOUDFLARE_ACCOUNT_ID:
required: true
CLOUDFLARE_TOKEN:
required: true
jobs:
prod:
# if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'

permissions:
contents: read
id-token: write
pull-requests: write
checks: write

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Restore built website
uses: actions/cache@v4
with:
path: dist
key: >
website
${{ github.run_id }}
${{ github.run_attempt }}
fail-on-cache-miss: true

- name: Publish to Cloudflare Pages
id: cloudflare-pages-deploy
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: jupyter-flex-danielfrg-com
directory: dist

- name: Comment deploy url
uses: mshick/add-pr-comment@v2
with:
message-id: cloudflare-deploy
message: |
### <span aria-hidden="true">✅</span> Preview deployment
| Name | Link |
|---------------------------------|------------------------|
| Deploy Preview Url | [${{ steps.cloudflare-pages-deploy.outputs.url }}](${{ steps.cloudflare-pages-deploy.outputs.url }}) |
| Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| Latest commit | ${{ github.sha }} |
| Environment | ${{ steps.cloudflare-pages-deploy.outputs.environment }} |
96 changes: 0 additions & 96 deletions .github/workflows/deploy-firebase.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy-cloudflare
name: deploy-post

on:
workflow_call:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: arduino/setup-task@v1
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2

# ------------------------------------------------------------------------
# JS

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Load cached node_modules
id: cached-node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: js/node_modules
key: >
Expand All @@ -67,11 +67,11 @@ jobs:
# Python

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v3
- uses: actions/cache@v4
id: cached-python-env
with:
path: ${{ env.pythonLocation }}
Expand Down Expand Up @@ -120,20 +120,20 @@ jobs:
- name: Cache website
id: cache-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: dist
key: >
website
${{ github.run_id }}
${{ github.run_attempt }}
firebase:
uses: ./.github/workflows/deploy-firebase.yml
cf-pages:
uses: ./.github/workflows/deploy-cf-pages.yml
needs: [build]
secrets: inherit

post-deploy:
uses: ./.github/workflows/deploy-cloudflare.yml
needs: [firebase]
uses: ./.github/workflows/deploy-post.yml
needs: [cf-pages]
secrets: inherit
7 changes: 0 additions & 7 deletions firebase.json

This file was deleted.

0 comments on commit d1085b7

Please sign in to comment.