Skip to content
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

support: Pushing to external repo fails #1059

Open
3 tasks done
younes-io opened this issue Jan 21, 2024 · 0 comments
Open
3 tasks done

support: Pushing to external repo fails #1059

younes-io opened this issue Jan 21, 2024 · 0 comments
Assignees
Labels
support User support

Comments

@younes-io
Copy link

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

I have this in a private repository, and I'm trying to use this action to push/publish my Quarto blog to a public repository, blog_p (folder docs contains the HTML/JS/CSS of the website to be served). So, I have created a personal token PAT, as you can see below, which has almost all rights. Yet, this fails

on:
  workflow_dispatch:
  push:
    branches: master

name: Quarto Publish

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

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

      # Uncomment below to set up R if needed in future
      # - name: Set up R
      #   uses: r-lib/actions/setup-r@v2
      #   with:
      #     r-version: '4.3.2'  # Specify the R version

      # Uncomment below to install R packages if needed in future
      # - name: Install R packages
      #   run: |
      #     Rscript -e "install.packages(c('rmarkdown', 'readr', 'here', 'dplyr', 'tibble', 'purrr', 'stringr'))"
      
      - name: Install Python and Dependencies
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'
          cache: 'pip'
      - name: Set up Python virtual environment
        run: |
          python -m venv env
          source env/bin/activate
      - run: pip install jupyter
      - name: Install dependencies
        run: |
          pip install -r requirements.txt

      - name: Copy CNAME to root of gh-pages branch
        run: echo "domainname.com" > CNAME

      - name: Render and Publish
        uses: quarto-dev/quarto-actions/publish@v2
        with:
          version: 1.4.540
          target: gh-pages
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Debug token
        run: echo "${{ secrets.PAT }}" | sed 's/./& /g' | uniq -c
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          personal_token: ${{ secrets.PAT }}
          external_repository: younes-io/blog_p
          publish_branch: gh-pages  # default: gh-pages
          publish_dir: ./docs
`` 

### Relevant links

```markdown
Public repository: https://github.com/younes-io/blog_p
YAML config: above
YAML workflow: publish.yaml (above)

Relevant log output

0s
Run echo "" | sed 's/./& /g' | uniq -c
  echo "" | sed 's/./& /g' | uniq -c
  shell: /usr/bin/bash -e {0}
  env:
    BUNDLE_EXT: linux-amd64.deb
    pythonLocation: /opt/hostedtoolcache/Python/3.[1](https://github.com/younes-io/blog/actions/runs/7603837919/job/20706049213#step:10:1)0.13/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
    Python[2](https://github.com/younes-io/blog/actions/runs/7603837919/job/20706049213#step:10:2)_ROOT_DIR: /opt/hostedtoolcache/Python/[3](https://github.com/younes-io/blog/actions/runs/7603837919/job/20706049213#step:10:3).10.13/x6[4](https://github.com/younes-io/blog/actions/runs/7603837919/job/20706049213#step:10:4)
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x[6](https://github.com/younes-io/blog/actions/runs/7603837919/job/20706049213#step:10:6)4
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.[10](https://github.com/younes-io/blog/actions/runs/7603837919/job/20706049213#step:10:10).13/x64/lib
      1 
0s
Run peaceiris/actions-gh-pages@v3
[INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme
Dump inputs
Setup auth token
  Error: Action failed with "not found deploy key or tokens"

Additional context.

No response

@younes-io younes-io added the support User support label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support
Projects
None yet
Development

No branches or pull requests

2 participants