|
| 1 | +name: Deploy site |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - main |
| 8 | + paths: |
| 9 | + - "assets/**" |
| 10 | + - "**.html" |
| 11 | + - "**.js" |
| 12 | + - "**.liquid" |
| 13 | + - "**/*.md" |
| 14 | + - "**.yml" |
| 15 | + - "!.github/workflows/axe.yml" |
| 16 | + - "!.github/workflows/broken-links.yml" |
| 17 | + - "!.github/workflows/deploy-docker-tag.yml" |
| 18 | + - "!.github/workflows/deploy-image.yml" |
| 19 | + - "!.github/workflows/docker-slim.yml" |
| 20 | + - "!.github/workflows/lighthouse-badger.yml" |
| 21 | + - "!.github/workflows/prettier.yml" |
| 22 | + - "!lighthouse_results/**" |
| 23 | + - "!CONTRIBUTING.md" |
| 24 | + - "!CUSTOMIZE.md" |
| 25 | + - "!FAQ.md" |
| 26 | + - "!INSTALL.md" |
| 27 | + - "!README.md" |
| 28 | + pull_request: |
| 29 | + branches: |
| 30 | + - master |
| 31 | + - main |
| 32 | + paths: |
| 33 | + - "assets/**" |
| 34 | + - "**.html" |
| 35 | + - "**.js" |
| 36 | + - "**.liquid" |
| 37 | + - "**/*.md" |
| 38 | + - "**.yml" |
| 39 | + - "!.github/workflows/axe.yml" |
| 40 | + - "!.github/workflows/broken-links.yml" |
| 41 | + - "!.github/workflows/deploy-docker-tag.yml" |
| 42 | + - "!.github/workflows/deploy-image.yml" |
| 43 | + - "!.github/workflows/docker-slim.yml" |
| 44 | + - "!.github/workflows/lighthouse-badger.yml" |
| 45 | + - "!.github/workflows/prettier.yml" |
| 46 | + - "!lighthouse_results/**" |
| 47 | + - "!CONTRIBUTING.md" |
| 48 | + - "!CUSTOMIZE.md" |
| 49 | + - "!FAQ.md" |
| 50 | + - "!INSTALL.md" |
| 51 | + - "!README.md" |
| 52 | + workflow_dispatch: |
| 53 | + |
| 54 | +permissions: |
| 55 | + contents: write |
| 56 | + |
| 57 | +jobs: |
| 58 | + deploy: |
| 59 | + # available images: https://github.com/actions/runner-images#available-images |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - name: Checkout 🛎️ |
| 63 | + uses: actions/checkout@v4 |
| 64 | + - name: Setup Ruby |
| 65 | + uses: ruby/setup-ruby@v1 |
| 66 | + with: |
| 67 | + ruby-version: "3.2.2" |
| 68 | + bundler-cache: true |
| 69 | + - name: Update _config.yml ⚙️ |
| 70 | + uses: fjogeleit/yaml-update-action@main |
| 71 | + with: |
| 72 | + commitChange: false |
| 73 | + valueFile: "_config.yml" |
| 74 | + propertyPath: "giscus.repo" |
| 75 | + value: ${{ github.repository }} |
| 76 | + - name: Install and Build 🔧 |
| 77 | + run: | |
| 78 | + pip3 install --upgrade jupyter |
| 79 | + export JEKYLL_ENV=production |
| 80 | + bundle exec jekyll build --lsi |
| 81 | + - name: Deploy 🚀 |
| 82 | + if: github.event_name != 'pull_request' |
| 83 | + uses: JamesIves/github-pages-deploy-action@v4 |
| 84 | + with: |
| 85 | + folder: _site |
0 commit comments