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

feat: workflow to update and build #6

Merged
merged 9 commits into from
May 28, 2024

Conversation

oliver-butterley
Copy link
Contributor

It seemed that it could be useful to have a custom workflow that can run everyday, check for updates and deploy the updated version directly. Here is a first attempt at such.

I have tested it a bit and seems fine although I haven't tested very extensively. Let me know if something like this is useful and if you have any requests for modifications, etc.

@oliver-butterley
Copy link
Contributor Author

I realise now that two changes that probably should be made:

  • Change the git user to the github-actions[bot]
  • Run only on the main branch (unfortunately the action has already been running on the PR branch and changing things)


jobs:
update_lean:
update:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run on main branch only.

Suggested change
update:
update:
if: github.ref == 'refs/heads/main'

- name: Commit updated version
if: steps.update-lean-mathlib.outputs.result == 'update-success'
run: |
git config user.name "$GITHUB_ACTOR"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to use action@github.com for commiter. (same as build.yaml)

Co-authored-by: Kitamado <47292598+Seasawher@users.noreply.github.com>
@oliver-butterley
Copy link
Contributor Author

Concerning the git user, after some reading it appears the best option is:

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

However any option still does the job in this particular use case.

On the other hand, the commit step could be completely removed. It could be arranged in a way that the only thing done is that every day an updated version is deployed to pages. In this sense an updated version of the repo is not required.

Let me know your preference and I can update the workflow correspondingly. My only objective was that the list of tactics on the page is always up to date with zero effort from humans.

@oliver-butterley oliver-butterley marked this pull request as draft May 24, 2024 12:04
@Seasawher
Copy link
Owner

On the other hand, the commit step could be completely removed. It could be arranged in a way that the only thing done is that every day an updated version is deployed to pages. In this sense an updated version of the repo is not required.

The commit step is necessary. The reason is that a markdown file is in this repository. I check the differences by looking at the markdown file.

@Seasawher
Copy link
Owner

Concerning the git user, after some reading it appears the best option is:

Thank you! However, for uniformity, please use the same commit method as in build.yml.

@Seasawher Seasawher mentioned this pull request May 28, 2024
@Seasawher Seasawher merged commit 88033e1 into Seasawher:main May 28, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants