Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

follow-up workflow not triggered after quarto publish action #55

Open
kanglcn opened this issue Dec 1, 2022 · 0 comments
Open

follow-up workflow not triggered after quarto publish action #55

kanglcn opened this issue Dec 1, 2022 · 0 comments

Comments

@kanglcn
Copy link

kanglcn commented Dec 1, 2022

Hi,

I have a public repo: https://github.com/kanglcn/insar101 to write and host a website with the quarto tool. The main branch is the source code, and the gh-pages is the generated website content.

I have two workflow files. The deploy.yml is used to render the content and update the gh-pages:

on:
  workflow_dispatch:
  push:
    branches: main

name: Quarto Publish

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Check out repository
        uses: actions/checkout@v2

      - name: Set up Quarto
        uses: quarto-dev/quarto-actions/setup@v2

      - name: Install Python and Dependencies
        uses: actions/setup-python@v4
        with:
          python-version: '3.9'
          cache: 'pip'
      - run: pip install -r requirements.txt

      - name: Render and Publish
        uses: quarto-dev/quarto-actions/publish@v2
        with:
          target: gh-pages
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

The sftp.yml is used to copy the gh-pages branch to another server via SFTP:

on:
  workflow_dispatch:
  page_build:

jobs:
  deploy_job:
    runs-on: ubuntu-latest
    name: sftp to SMU
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: 'gh-pages'
      - name: deploy file
        uses: wlixcc/SFTP-Deploy-Action@v1.2.4
        with:
          username: ${{ secrets.SMU_HOST_USER}}
          server: ${{ secrets.SMU_HOSTNAME }} 
          sftp_only: true
          password: ${{ secrets.SMU_HOST_PASSWORD }}
          local_path: './*'
          remote_path: '/users/pubhtml/other/kangl/public_html/insar101'
          sftpArgs: '-o ConnectTimeout=5'

I found the first workflow can be corrected triggered by push, then the github pages was built successfully. However, the second workflow was not triggered. The interesting thing is, if I change the repo from public to private, the second workflow will be triggered.

I have asked a question at https://github.com/orgs/community/discussions/40392#discussioncomment-4283136 and people there suspect this is because workflow using GITHUB_TOKEN will not trigger new workflow anymore. I have tried to replace GITHUB_TOKEN to a personal access token but the SFTP workflow was still not triggered.

Does anybody know the solution?
Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant