Skip to content

Commit

Permalink
No GitHub Pages anymore after 30th January 2025
Browse files Browse the repository at this point in the history
tired of their changes
  • Loading branch information
ed-asriyan committed Feb 4, 2025
1 parent f23ce84 commit e307782
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,8 @@ jobs:
path-to-root: dist
base-url-path: https://watchtogether.online

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: Deploy to Cloudflare Pages
run: npx wrangler pages deploy dist --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }} --branch main
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,30 @@ Now you can run the dev server locally:
make dev_serve
```

## Generate prod bundle
Or generate production bundle:
```console
make prod_build_bundle
```

## GitHub Actions
* Each push to `master` triggers deployment to production
* Every 1 day of a month, teams last updated more than 31 days ago are deleted
* Make sure that `ENV_FILE_CONTENT` repository variable is filled
## Deployment
### CD
Each push to `master` triggers [CD.yml](./.github/workflows/CD.yml) pipeline that builds production bundle and published it on
Cloudflare Pages. To make it work you must have

GitHub repository environment variables:
* `ENV_FILE_CONTENT` with content of filled [.env](./.env)

GitHub repository secrets:
* `CLOUDFLARE_PROJECT_NAME` - name of Cloudflare Pages project
* `CLOUDFLARE_ACCOUNT_ID` - Cloudflare account id that owns the project
* `CLOUDFLARE_API_TOKEN` - Cloudflare API token that have edit rights in the project

### Auto clean up
Every 1 day of a month, teams last updated more than 31 days ago are deleted by
[clean-db.yml](./.github/workflows//clean-db.yml) workflow. To make it work you must have:

GitHub repository environment variables:
* `ENV_FILE_CONTENT`

GitHub repository secrets:
* `FIREBASE_SERVICE_ACCOUNT_KEY`

0 comments on commit e307782

Please sign in to comment.