Skip to content

Pushing content from a folder to a branch without the folder? #405

Answered by peaceiris
Andre601 asked this question in Q&A
Discussion options

You must be logged in to vote

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.

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

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Andre601
Comment options

@Plankiton
Comment options

Answer selected by Andre601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants