-
-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide starter workflows to Custom GitHub Actions Workflows in GitHub Pages #2561
Comments
Interesting. I don't have time to investigate right now, but PRs are welcome |
I have this workflow, which builds the site in the master branch and deploys it to the gh-pages branch. name: Middleman deploy on push
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
submodules: true
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install bundler
run: gem install bundler:2.1.4
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
# - name: npm install packages
# run: |
# npm install
- name: Build site
run: bundle exec middleman build
- name: Deploy site
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build I don't know if this is what you are looking for, but I hope it helps you. |
@joapuiib Thanks, but your suggestion is the legacy one suitable before Custom GitHub Actions Workflows (beta). You do not have to use an extra branch like |
That would be amazing @tnir! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, I created a PR for Middleman deploy starter workflow: actions/starter-workflows#2145. Not sure if it will get merged, but in the meantime the workflow file can be used as a template: # This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Sample workflow for building and deploying a Middleman site to GitHub Pages
# To get started with Middleman see: https://middlemanapp.com/
name: Deploy Middleman site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: [$default-branch]
# Allows you to run this workflow manually from the Actions tab
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 job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Middleman
run: bundle exec middleman build
env:
BASE_URL: ${{ steps.pages.outputs.base_url }}
NO_CONTRACTS: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build
# Deployment job
deploy:
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@v2 Hope this helps! |
Custom GitHub Actions Workflows were just announced.
As of the announcement, Next.js, Hugo, Gatsby, Jekyll, and NuxtJS are the first starter workflows available at https://github.com/actions/starter-workflows/tree/main/pages.
https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/
I would be happy if custom GitHub Actions workflow for Middleman is provided in that repository, somewhere else (or this repository).
The text was updated successfully, but these errors were encountered: