Skip to content

Commit

Permalink
Publish site with GitHub actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmedrano committed Jan 1, 2025
1 parent a7dfc91 commit e6c3b7c
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 16 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: publish_site

on:
push:
branchs: ['main']
workflow_dispatch:

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

# Allow only one concurrent deployment, skipping runs queued between
# the run in-progress and latest queued. However, do NOT cancel
# in-progress runs as we want to allow these production deployments to
# complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
bundler-cache: true
cache-version: 0 # Increment this number to re-download cached gems.
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
run: |
bundle install
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy-site:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-site
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
30 changes: 14 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ GEM
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
colorator (1.1.0)
concurrent-ruby (1.3.4)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.27.3-x86_64-linux)
google-protobuf (4.29.2-x86_64-linux)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jekyll (4.3.3)
jekyll (4.3.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -42,16 +42,16 @@ GEM
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
minima (2.5.1)
minima (2.5.2)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
Expand All @@ -62,17 +62,15 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.5)
strscan
rouge (4.3.0)
rexml (3.4.0)
rouge (4.5.1)
safe_yaml (1.0.5)
sass-embedded (1.77.8-x86_64-linux-gnu)
google-protobuf (~> 4.26)
strscan (3.1.0)
sass-embedded (1.83.0-x86_64-linux-gnu)
google-protobuf (~> 4.28)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)
webrick (1.8.1)
unicode-display_width (2.6.0)
webrick (1.9.1)

PLATFORMS
x86_64-linux
Expand Down

0 comments on commit e6c3b7c

Please sign in to comment.