Skip to content

Commit

Permalink
Add GitHub Actions workflow (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
lifehackerhansol authored Apr 24, 2024
1 parent 029bfbd commit a6fbe15
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy site

on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

- name: Configure GitHub Pages
uses: actions/configure-pages@v3

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Run Jekyll
# Build the site using Jekyll
run: JEKYLL_ENV=production bundle exec jekyll build

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

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@v4
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test site build

on:
pull_request:

jobs:
doc-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Run Jekyll
# Build the site using Jekyll
run: JEKYLL_ENV=production bundle exec jekyll build

0 comments on commit a6fbe15

Please sign in to comment.