Merge branch 'alshedivat:master' into cloudflare #653
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 site | |
on: | |
push: | |
branches: | |
- beta | |
- cloudflare | |
- github | |
paths: | |
- "assets/**" | |
- "**.bib" | |
- "**.html" | |
- "**.js" | |
- "**.liquid" | |
- "**/*.md" | |
- "**.yml" | |
- "Gemfile" | |
- "Gemfile.lock" | |
- "!.github/workflows/axe.yml" | |
- "!.github/workflows/broken-links.yml" | |
- "!.github/workflows/deploy-docker-tag.yml" | |
- "!.github/workflows/deploy-image.yml" | |
- "!.github/workflows/docker-slim.yml" | |
- "!.github/workflows/lighthouse-badger.yml" | |
- "!.github/workflows/prettier.yml" | |
- "!.github/workflows/firebase-hosting-deploy.yml" | |
- "!lighthouse_results/**" | |
- "!CONTRIBUTING.md" | |
- "!CUSTOMIZE.md" | |
- "!FAQ.md" | |
- "!INSTALL.md" | |
- "!README.md" | |
pull_request: | |
branches: | |
- cloudflare | |
- github | |
paths: | |
- "assets/**" | |
- "**.bib" | |
- "**.html" | |
- "**.js" | |
- "**.liquid" | |
- "**/*.md" | |
- "**.yml" | |
- "Gemfile" | |
- "Gemfile.lock" | |
- "!.github/workflows/axe.yml" | |
- "!.github/workflows/broken-links.yml" | |
- "!.github/workflows/deploy-docker-tag.yml" | |
- "!.github/workflows/deploy-image.yml" | |
- "!.github/workflows/docker-slim.yml" | |
- "!.github/workflows/lighthouse-badger.yml" | |
- "!.github/workflows/prettier.yml" | |
- "!lighthouse_results/**" | |
- "!CONTRIBUTING.md" | |
- "!CUSTOMIZE.md" | |
- "!FAQ.md" | |
- "!INSTALL.md" | |
- "!README.md" | |
workflow_run: | |
workflows: [Build Notion Posts] | |
types: | |
- completed | |
workflow_dispatch: | |
permissions: | |
contents: write | |
concurrency: | |
group: "deploy" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
# available images: https://github.com/actions/runner-images#available-images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2.2" | |
bundler-cache: true | |
- name: Update _config.yml ⚙️ | |
uses: fjogeleit/yaml-update-action@main | |
with: | |
commitChange: false | |
valueFile: "_config.yml" | |
propertyPath: "giscus.repo" | |
value: ${{ github.repository }} | |
- name: Install and Build 🔧 | |
run: | | |
pip3 install --upgrade jupyter | |
export JEKYLL_ENV=production | |
bundle exec jekyll build --lsi | |
- name: Purge unused CSS 🧹 | |
run: | | |
npm install -g purgecss | |
purgecss -c purgecss.config.js | |
- name: Add Links page submodule | |
run: | | |
git submodule add -f https://github.com/alerezaaa/littlelink _site/links | |
- name: Deploy 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: _site | |
branch: cf-pages | |
### deploy to firebase | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ALIREZA_ACCA7 }}' | |
channelId: live | |
projectId: alireza-acca7 |