Closed ashokvaddevalli closed 3 months ago
Hi @peaceiris We are using GitHub Enterprise, and we can't enable all actions due to security reasons. We are enabling the required actions as per request. We are enabled this action peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e but we are facing the issue. Any dependent actions for this action?
We must use the same declaration for the workflow file and allow list, I expect.
When we pin a custom action in the allow list by a commit hash, we need to use the commit hash in our YAML workflow file.
I tried using commit has only, but the issue is the same.
Ahh, it seems that we cannot override a policy managed by the enterprise. Could you ask the enterprise owners to add this action to the allow list using the commit hash?
[!NOTE] You might not be able to manage these settings if your organization has an overriding policy or is managed by an enterprise that has overriding policy. For more information, see "Disabling or limiting GitHub Actions for your organization" or "Enforcing policies for GitHub Actions in your enterprise."
Hi, This action is already enabled after my request, but I am facing this issue. We are using other actions, but we are not seeing this issue, and we are facing issues with using this action. peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
Oh, sorry. I have no more idea about this...
Today, the official custom GitHub Action to deploy GitHub Pages is available. We can try it.
Hi, Using deploy-pages action, i have not seen publish_branch and publish_dir options.
Also, we need the actions/upload-pages-artifact to upload our publish_dir
.
Here is an example workflow (not tested).
name: Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: build_something
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "publish_dir"
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@v4
I am trying to publish allure reports, and we want access to previous reports as well. I am trying to use the below action.
name: Run tests and publish report on: [push] jobs: test: runs-on: ubuntu-latest steps:
uses: actions/checkout@v3
name: Set up JDK uses: actions/setup-java@v3 with: distribution: zulu java-version: 17
name: Run tests run: ./gradlew clean test
name: Load test report history uses: actions/checkout@v3 if: always() continue-on-error: true with: ref: gh-pages path: gh-pages
name: Build test report uses: simple-elf/allure-report-action@v1.7 if: always() with: gh_pages: gh-pages allure_history: allure-history allure_results: build/allure-results
name: Publish test report uses: peaceiris/actions-gh-pages@v3 if: always() with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: gh-pages publish_dir: allure-history
I have tried without gh-pages action and it is working fine.
name: Deploy Allure report to GitHub Pages if: always() # Execute even if previous steps fail run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@se.com"
# Checkout the gh-pages branch
git fetch origin
git checkout -B gh-pages origin/gh-pages
# Copy the new report to the gh-pages branch
mkdir -p auto_test_report/${{ github.run_number }}
cp -r allure-report/index.html auto_test_report/${{ github.run_number }}
# mkdir -p auto_test_report/latest
cp -r allure-report/index.html auto_test_report/latest
# Commit and push the changes
git add auto_test_report/${{ github.run_number }}/index.html auto_test_report/latest/index.html
git commit -m "Update Allure test report"
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Checklist
Describe your question
We are facing issues using this action on Github Enterprise.
Error: Unable to resolve actions. Cannot access repositories 'peaceiris/actions-gh-pages'. Enable access using Settings in the Action repository. See https://docs.github.com/enterprise-server@3.12/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository for more information.
Relevant links
Relevant log output
Getting action download info Error: Unable to resolve actions. Cannot access repositories 'peaceiris/actions-gh-pages'. Enable access using Settings in the Action repository. See https://docs.github.com/enterprise-server@3.12/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository for more information.
Additional context.
No response