Comments (9)
It's either your site deploys from a branch and we enforce some security rules on your behalf. Or you use take control with GitHub Actions. The "official Actions" you refer to are designed for the later case.
from deploy-pages.
That actually succeeded! I wasn't aware of the "Environments" section on the Settings page. So I will make sure that it's set up next time. Thanks again for helping with this.
from deploy-pages.
In the settings for Pages on your repo, change the source from Branch to GitHub Actions. This will allow you to control Pages deployments with your workflow exclusively.
from deploy-pages.
Ok, I didn't see that it was an option. However, I was trying use the official actions like this one in my own workflow. I think the reason for the error was because it was trying to do it from master and not gh-pages. So instead I would have to push to the gh-pages branch and then let Pages deploy that automatically?
from deploy-pages.
I was trying to follow your advice, but the Github documentation for that feature is telling me to actually use your action from the default branch (see step 5): https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site
from deploy-pages.
I create a clean version of the workflow and here's the fail log.
from deploy-pages.
@cengique The documentation you are referring makes the assumption your Pages site is configured with Source = GitHub Actions in the settings.
When you configure your site to publish with GitHub Actions, GitHub will suggest starter workflows for common publishing scenarios. The general flow of a workflow is to:
This is not the case for GGC-STaRS/GGC-STaRS.github.io
. Follow the steps here and try again.
from deploy-pages.
@yoannchaudet the above screenshot was produced when I had Source="Github Actions" and when it didn't work, had reverted back. I just checked again in commit 13d4922 with Source=GA and this workflow, and I'm still getting the exact same error as in the above screenshot. Notice that this time it does not explicitly complain about not being on the gh-pages
branch, but it's some other kind of environment protection. I do have the environment defined in the deploy
step as follows:
deploy:
# Deploy to the github-pages environment
# (only accepts being run from gh-pages,
# potentially in a separate workflow file)
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@v1
from deploy-pages.
@cengique Pages defines sensible security defaults for you. When you switch back and forth between Actions/branch publication, you have a bit of work to do.
You have full control over the branch protection for your environments in the settings of your repo (see here).
This is an Actions check, not a Pages one:
from deploy-pages.
Related Issues (20)
- Is there a way to use this in the composite action? HOT 3
- [QUESTION] Is it possible to deploy a single file without losing existent files? HOT 1
- Actions fail after update actions/deploy-pages to v4 and actions/upload-pages-artifact to v3 HOT 17
- Failing to fetch artifact metadata since 4.0.0 HOT 8
- Bump to V4 broke the deploy step HOT 9
- Remove requirement for `actions: read` permission HOT 1
- Unhelpful Error HOT 5
- Page Deployment Failing Periodically with Timeouts since Upgrade to v4 HOT 1
- Getting "Fetching artifact metadata failed." HOT 3
- Confusing error when trying to deploy Rust docs HOT 6
- CNAME file doesn't work to set custom domain
- Error: No artifacts named "github-pages" were found for this workflow run. HOT 5
- Deploy to another repository HOT 2
- GitHub Enterprise Server 3.11.5 compatibility HOT 6
- Deployment protection rules seem to be ignored HOT 1
- 502 error on github enterprise HOT 3
- More clarity on id-token: write HOT 11
- Artifact could not be deployed; no symlinks or hard links, small size HOT 1
- When the preview feature will be available
- Allow deploy by artifact_id
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deploy-pages.