Closed ghost closed 4 years ago
Can you try this:
name: Build and deploy Jekyll site to GitHub Pages
on:
push:
branches:
- website
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@2.0.3
env:
JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}
That would work if I didn't also have to check out the master branch. One of my jekyll jobs is to run against the master branch (expected to be checked out to ../COSMOS) to collect information for our documentation. We may be structuring things a little differently than normal. We have our code in the master branch, a dedicated 'website' branch for the site source, and of course the 'gh-pages' branch for the deployed site.
🤔 both master
and website
have a Gemfile
so it means you're (maybe) overwriting one with the other. This seems a bit complicated.
What about turning the website
branch into a directory within master
? Then, once we merge #35 🔜 you'll be able to specify which Gemfile
to use and will end up with a simpler workflow.
@helaili thanks I will look into that
I'm working with the COSMOS project and I have a workflow yml as follows in my 'website' branch:
While this works it ends up pushing our entire repo into the gh-pages branch since the COSMOS checkout is a nested directory. I tried the following to checkout both the website and COSMOS to different directories:
However this failed with "Could not locate Gemfile":