-
I'm in the work of creating a workflow to automatically push changes made to a folder within a specific branch to another branch, that is used to publish the content to GitHub Pages. I have the following folder structure.
In addition do I have the branches My goal now is, to take the content in
To close this off is here the current not working Workflow file: name: Deploy Site
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
branches:
- development # Only trigger on the development branch
jobs:
build:
runs-on: [ubuntu-latest]
steps:
- name: Perform Checkout
uses: actions/checkout@v2
- name: Deploy Files
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add site # Add changes made in site to commit
git commit -m "Update Website (${GITHUB_SHA:0:7})"
git push master origin # Is this how it will be pushed? I appreciate any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
How about the following workflow? name: Deploy Site
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
branches:
- development # Only trigger on the development branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Perform Checkout
uses: actions/checkout@v2
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
publish_branch: master |
Beta Was this translation helpful? Give feedback.
How about the following workflow?
peaceiris/actions-gh-pages: GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.