• Stars
    star
    7
  • Rank 2,294,772 (Top 46 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ARCHIVED See link below, this action is now longer needed following the release of Bridgetown V1

🚨 Archived

This action has been replaced by Bridgetown v1.0's gh-pages bundled configuration and has been archived. It will not be receiving any future updates and it is highly advised that you migrate to the action that Bridgetown now provides.

I have provided a tutorial for using the new action provided by Bridgetown below:

➑️ How to Deploy Your Bridgetown Site to Github Pages (2022)

Thank you to everyone who contributed their thoughts, time, and code to this project ❀️

Banner

bridgetown-gh-pages-action

A GitHub Action for building and deploying a Bridgetown site to GitHub Pages.

Getting Started

This is intended to be an out-of-the-box solution for deploying your Bridgetown to GitHub Pages.

- name: Build & Deploy to GitHub Pages
  uses: andrewmcodes/[email protected]
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}

🚨 IMPORTANT Due to the way GitHub Actions work, you cannot pass in a Ruby version to the Docker container that gets built (or at least I can't find a way). Due to this, this action will build your site with Ruby 2.7.1. If you cannot upgrade your Ruby version for some reason, I suggest forking this action and adding the Ruby version you need in the Dockerfile, or using a manual solution.

Usage

Basic

name: Deploy

on:
  push:
    branches: [main]

jobs:
  build_and_deploy:
    name: Build & Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build & Deploy to GitHub Pages
        uses: andrewmcodes/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

Advanced

name: Deploy

on:
  push:
    branches: [main]

jobs:
  build_and_deploy:
    name: Build & Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build & Deploy to GitHub Pages
        uses: andrewmcodes/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          repository: andrewmcodes/bridgetown-gh-pages-action
          github_actor: octokit
          site_location: "./site"
          build_location: "./site/output"
          deploy_branch: "deploy"
          commit_message: "Release the site"

Inputs

Name Type Required? Default Description
github_token String true Token for the repo. Can be passed in using ${{ secrets.GITHUB_TOKEN }}.
repository String false ${{ github.repository }} The GitHub repository to push the built site to.
github_actor String false ${{ github.actor }} Name of the deploy actor.
site_location String false . Location of the Bridgetown project within your repo.
build_location String false ./output Location of your Bridgetown generated site.
default_branch String false main The name of your default branch.
deploy_branch String false gh-pages Branch name to push the site to.
commit_message String false chore: deploy site The commit message that will be used when deploying.

Manual Solution

If you cannot use this action due to version constraints or other issues, you can do this manually with something like:

name: Deploy

on:
  push:
    branches:
      - main

jobs:
  deploy:
    name: Deploy to GitHub Pages
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: "13.x"
      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - uses: actions/cache@v1
        id: yarn-cache
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
      - name: Set up Ruby 2.7
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7.1
      - name: Cache gems
        uses: actions/cache@v1
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-
      - name: Install Dependencies
        run: |
          bundle config path vendor/bundle
          bundle install --jobs 4 --retry 3
          yarn install
      - name: Build site for deployment
        run: yarn deploy
      - name: Deploy to GitHub Pages
        if: success()
        uses: crazy-max/ghaction-github-pages@v2
        with:
          target_branch: gh-pages
          build_dir: output
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Demo

bridgetown-gh-pages-starter

This starter can be used to reproduce issues as well as provide an example of the plugin's usage.

You can view the live version at: andrewmcodes.github.io/bridgetown-gh-pages-starter.

Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Releasing

Update Changelog

Update

conventional-changelog -p angular -i CHANGELOG.md -s

Regenerate

conventional-changelog -p angular -i CHANGELOG.md -s -r 0

License

This plugin is released under the MIT License.

More Repositories

1

obsidian-beginner-vault-template

A minimal template for your first Obsidian vault aimed at setting good defaults.
56
star
2

awesome-lucky

A collection of awesome Lucky libraries, tools, frameworks and resources
44
star
3

standardrb-action

StandardRB Action: A GitHub Action to run StandardRB against your code!
Ruby
33
star
4

warp-one-dark-darker

Warp theme based on One Dark Darker
26
star
5

shotgun

Ready to go Rails App with TailwindCSS, ViewComponent, Devise, and more!
Ruby
25
star
6

pruner

CLI tool to delete Git branches
Ruby
20
star
7

bundler-audit-action

Bundler Audit Action
Dockerfile
17
star
8

stimulus_reflex_table_filter

Demo app showing how you can filter a table in a Ruby on Rails app with StimulusReflex
Ruby
17
star
9

awesome-bridgetown

A curated list of awesome things related to Bridgetown
13
star
10

rails-extension-power-pack

An extension pack of my favorite VS Code extensions for Ruby on Rails development.
Ruby
11
star
11

forem_lite

A simple tool to help you get articles from Forem/Dev.to
Ruby
11
star
12

andrewm.codes

My personal website built on Bridgetown
HTML
11
star
13

dishwasher

A CLI tool to help you easily delete forked repositories.
Ruby
10
star
14

awesome-stars

An Awesome List of my Awesome Stars
9
star
15

bridgetown-inline-svg

ARCHIVED migrated to bridgetown-svg-inliner
Ruby
9
star
16

bridgetown-netlify-cms-starter

A template to help you get started with Bridgetown + Netlify CMS
JavaScript
8
star
17

andrewmcodes

andrewmcodes public readme
6
star
18

andrewmcodes_gem

My gem card
Ruby
4
star
19

haml-lint-action

A GitHub Action that lints your HAML code with HAML Lint!
Ruby
4
star
20

alfred-themes

My personal Alfred 5 themes
4
star
21

redux-on-rails

I DIDNT WANT THIS BUT YOU MADE ME DO IT
Ruby
3
star
22

.github

Default community health files for @andrewmcodes
3
star
23

bridgetown-torchlight-demo

A demo Bridgetown website that has Torchlight syntax highlighting configured!
JavaScript
3
star
24

dotfiles

My personal dot and settings files
Shell
3
star
25

release-please-demo

Ruby
2
star
26

turbo_debug

Ruby
2
star
27

vercel_ruby

WIP Vercel Serverless Functions written in Ruby
Ruby
2
star
28

.dotfiles-update

A temporary repo where I am rebuilding my dotfiles
Shell
2
star
29

rails-cable-route-bug-reproduction

Ruby
1
star
30

actions

Shared GitHub Actions
Shell
1
star
31

prettier-config

My personal Prettier configuration
JavaScript
1
star
32

bridgetown-gh-pages-demo

Demo of the new gh-pages configuration in Bridgetown v1.0
JavaScript
1
star
33

github-actions

MOVED TO andrewmcodes/actions
1
star
34

vscode-tailwindcss-extension-pack

An extension pack for VSCode of extensions for developing with Tailwind CSS.
1
star
35

remote-ruby-vault

Obsidian vault of Remote Ruby episodes for personal research
JavaScript
1
star
36

bridgetown-esbuild-minifySyntax

Benchmarking usage of minifySyntax with esbuild and Bridgetown
JavaScript
1
star
37

warp-radix

Warp theme based on the Radix color system
1
star
38

advent_of_code

Solutions to Advent of Code
Ruby
1
star