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

GitHub Actions Tutorial to automatically deploy on push #395

Open
LeonardNolting opened this issue Feb 28, 2021 · 0 comments
Open

GitHub Actions Tutorial to automatically deploy on push #395

LeonardNolting opened this issue Feb 28, 2021 · 0 comments

Comments

@LeonardNolting
Copy link

LeonardNolting commented Feb 28, 2021

Goal: On push to master, if there are changes to /docs, automatically run :docs:orchidDeploy -PorchidEnvironment=prod.
Approach: GitHub actions; this also allows storing the required githubToken environment variable as an encrypted secret. (Additionally, the built-in variable GITHUB_TOKEN seems to work as well, so there's no need to create a personal access token.)

In the hope that other beginners like me will not have to deal with this themselves, I propose to add a short section on the pages OrchidGithub and How to document a Kotlin project/Deploy on GitHub pages about how to achieve this goal.

What the workflow could look like:
https://github.com/nee/neebt/blob/master/.github/workflows/deploy-docs.yml

I'm unsure about the following points:

  • is this a good approach after all (using GitHub actions)? Perhaps there's a simpler solution.
  • in the workflow, do we need eskatos/gradle-command-action@v1, or is a simple command ./gradlew ... enough?
  • are encrypted secrets a good choice here? Perhaps I overlooked something that makes them unsuitable for this use case.

If this is added, I think it's a good idea to also mention that you should make sure the gradle-wrapper.jar is added to version control, as it seems to be common to have *.jar on the .gitignore. (!gradle/wrapper/gradle-wrapper.jar)

Personally, I'm interested in whether there's an intended way of doing this and in how others dealt with this?

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

1 participant