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

view Netlify compiled book when it is compiling or has failed ? #34

Open
andysouth opened this issue Jul 1, 2021 · 9 comments
Open
Assignees

Comments

@andysouth
Copy link
Member

Currently seems that compiled book is not viewable at https://afrimapr-book.netlify.app/ when compilation has failed or is in progress.

Can we change settings so that we (& others) can view the last successful version ? That is what happened with the previous tic workflow.

@andysouth
Copy link
Member Author

@anelda pointed out that you can have either a staging or preview deployment.
https://docs.netlify.com/site-deploys/overview/

Branch deploy: a deploy generated from a branch that is not your production branch. Branch deploys are published to a URL which includes the branch name as a prefix. For example, if a branch is called staging, it will deploy to staging--yoursitename.netlify.app. If you use Netlify DNS, you can enable branch subdomains, so the staging branch example would deploy to staging.yourcustomdomain.com.

Andy to look into how we can implement this with the auto book compilation.

Maybe we get the automatic workflow to compile to a staging deployment & then only update to the production site manually when we are happy.

Not sure how to do that yet.

@andysouth
Copy link
Member Author

Following the advice above about deploying to a staging site. I have created a staging branch, so that hopefully we'll be able to work on that and manually pull request to the main branch when we want to update the live site.

I'm hoping that the staging site will become visible at : https://staging--afrimapr-book.netlify.app/

@andysouth
Copy link
Member Author

Alas, although the deployment from the Github staging branch reported success. The staging url : https://staging--afrimapr-book.netlify.app/ says 'Not found'.

@anelda can you see what I might have done wrong here ?

@andysouth
Copy link
Member Author

Aha now that I've read that page above to the end, seems I may need to change some Netlify settings, once I can find where they are.

By default, Netlify deploys the site’s production branch after every change.

To generate branch deploys for other branches in your repository, select your site on the Sites page. Then go to Site settings > Build & deploy > Continuous Deployment > Branches, and select Edit settings. You can choose to deploy all branches (including future branches), or select individual branches you would like to deploy.

@andysouth
Copy link
Member Author

andysouth commented Sep 16, 2021

Now I've set that the staging branch should deploy.
https://app.netlify.com/sites/afrimapr-book/settings/deploys

But now the staging url is giving 404 File not found - which is progress from what it was doing before but still not working ?

@andysouth
Copy link
Member Author

Hi @anelda I'm just about to send you an invite to the Netlify team to see if you can help resolve this issue. Seems we are close but would benefit from your technical web skills :-). We'd like to have a staging version automatically updated, so that we can choose when to update a stable version.

@andysouth
Copy link
Member Author

Hmmm, but adding a member would cost $15 a month. Maybe you can advise a way we can do this in our chat tomorrow :-)

@anelda
Copy link

anelda commented Jan 27, 2022 via email

@andysouth
Copy link
Member Author

Thankyou to @anelda 👍 we have now set auto-publishing off in the Netlify settings (see below) this means that pushed commits trigger a preview build on Netlify (the main book stays up). Then on the Netlify site the owner (Andy in this case) can select the production build and choose to deploy it to the main site.

image

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

No branches or pull requests

3 participants