Merge branch 'master' of github.com:dsa-ntc/dsa-planet #16
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: Jekyll CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: docker://ruby:3.1 | |
env: | |
BUNDLE_PATH: .bundle | |
with: | |
entrypoint: bundle | |
args: install -j=4 | |
- name: Fetch the content | |
uses: docker://ruby:3.1 | |
env: | |
BUNDLE_PATH: .bundle | |
LANG: en_US.UTF-8 | |
LANGUAGE: en_US.UTF-8 | |
LC_ALL: C.UTF-8 | |
with: | |
entrypoint: bundle | |
args: exec rake | |
- name: Build the site | |
uses: docker://ruby:3.1 | |
env: | |
BUNDLE_PATH: .bundle | |
LANG: en_US.UTF-8 | |
LANGUAGE: en_US.UTF-8 | |
LC_ALL: C.UTF-8 | |
with: | |
entrypoint: bundle | |
args: exec jekyll build | |
- name: Upload artifact | |
# Automatically uploads an artifact from the './_site' directory by default | |
uses: actions/upload-pages-artifact@v2 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |