From 8fc5b74589a82f72688a38dbfc8adceb3a8657a2 Mon Sep 17 00:00:00 2001 From: Riley Wong Date: Mon, 19 Feb 2024 23:52:27 -0500 Subject: [PATCH] Github pages using github actions --- .github/workflows/gov-arch-site.yml | 37 +++++++++++++++++++++++++++++ .ruby-version | 1 + Gemfile | 6 ++++- _config.yml | 2 +- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/gov-arch-site.yml create mode 100644 .ruby-version diff --git a/.github/workflows/gov-arch-site.yml b/.github/workflows/gov-arch-site.yml new file mode 100644 index 0000000..adf9f9f --- /dev/null +++ b/.github/workflows/gov-arch-site.yml @@ -0,0 +1,37 @@ +name: Build and Deploy a Jekyll Site to GitHub Pages + +on: + push: + branches: + - main + +jobs: + jekyll: + runs-on: macos-latest + steps: + - name: 📂 setup + uses: actions/checkout@v2 + + # include the lines below if you are using jekyll-last-modified-at + # or if you would otherwise need to fetch the full commit history + # however this may be very slow for large repositories! + # with: + # fetch-depth: '0' + - name: 💎 setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2 + + - name: 🔨 install dependencies & build site + uses: limjh16/jekyll-action-ts@v2 + with: + enable_cache: true + + - name: 🚀 deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site + # if the repo you are deploying to is .github.io, uncomment the line below. + # if you are including the line below, make sure your source files are NOT in the "main" branch: + # publish_branch: main diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..ab96aa9 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +ruby-3.2.3 diff --git a/Gemfile b/Gemfile index 92e0134..61fa1a4 100644 --- a/Gemfile +++ b/Gemfile @@ -3,5 +3,9 @@ source "https://rubygems.org" gemspec +ruby "3.2.3" + +gem "jekyll", "~> 4.2.0" + # for demo site -gem "jekyll-paginate" \ No newline at end of file +gem "jekyll-paginate" diff --git a/_config.yml b/_config.yml index e0a4e60..c1b7846 100644 --- a/_config.yml +++ b/_config.yml @@ -17,7 +17,7 @@ title: Governance Archaeology # email: hello@patdryburgh.com description: >- # this means to ignore newlines until "baseurl:" TK Governance Archaeology description -baseurl: "/" # the subpath of your site, e.g. /blog +baseurl: "/gov-arch-site" # the subpath of your site, e.g. /blog url: "https://patdryburgh.github.io" # the base hostname & protocol for your site, e.g. http://example.com # icon: /assets/images/icon-512.png # twitter_username: patdryburgh