Skip to content

Commit

Permalink
Update Checkout Action Version (#27)
Browse files Browse the repository at this point in the history
* update checkout action.

* update checkout action version.
  • Loading branch information
khajavi authored Dec 25, 2022
1 parent 4b5b037 commit 77ad5c5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
fetch-depth: '0'
- name: Setup Scala
Expand All @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
ref: ${{ github.head_ref }}
fetch-depth: '0'
Expand All @@ -64,10 +64,9 @@ jobs:
title: Update README.md
commit-message: Update README.md
branch: zio-sbt-website/update-readme
body: |
body: |-
Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin.
I will automatically update the README.md file whenever there is new change for README.md, e.g.
- After each release, I will update the version in the installation section.
- After any changes to the "docs/index.md" file, I will update the README.md file accordingly.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ enablePlugins(WebsitePlugin)
ZIO SBT Website is an SBT plugin that has the following tasks:

- `sbt compileDocs`— compile documentation inside `docs` directory. The compilation result will be inside `website/docs` directory.
- `sbt installWebsite`— creates a website for the project inside the `website` directory
- `sbt installWebsite`— creates a website for the project inside the `website` directory.
- `sbt previewWebsite`— runs a local webserver that serves documentation locally on http://localhost:3000. By changing the documentation inside the `docs` directory, the website will be reloaded with new content.
- `sbt publishToNpm`— publishes documentation inside the `docs` directory to the npm registry.
- `sbt generateGithubWorkflow`— generates GitHub workflow which publishes documentation for each library release.
- `sbt generateReadme`— generate README.md file.
- `sbt generateReadme`— generate README.md file from `docs/index.md` and sbt setting keys.
5 changes: 3 additions & 2 deletions zio-sbt-website/src/main/scala/zio/sbt/WebsitePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,13 @@ object WebsitePlugin extends sbt.AutoPlugin {

lazy val generateGithubWorkflowTask: Def.Initialize[Task[Unit]] =
Def.task {
val workflow = WebsiteUtils.websiteWorkflow(docsPublishBranch.value, sbtBuildOptions.value, docsVersioning.value)

val template =
s"""|# This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow`
|# task and should be included in the git repository. Please do not edit it manually.
|
|${WebsiteUtils.websiteWorkflow(docsPublishBranch.value, sbtBuildOptions.value, docsVersioning.value)}
|""".stripMargin
|$workflow""".stripMargin

IO.write(new File(".github/workflows/site.yml"), template)
}
Expand Down
7 changes: 3 additions & 4 deletions zio-sbt-website/src/main/scala/zio/sbt/WebsiteUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ object WebsiteUtils {
Seq(
Step.SingleStep(
name = "Git Checkout",
uses = Some(ActionRef("actions/checkout@v3.1.0")),
uses = Some(ActionRef("actions/checkout@v3.2.0")),
parameters = Map("fetch-depth" -> "0".asJson)
),
Step.SingleStep(
Expand Down Expand Up @@ -225,7 +225,7 @@ object WebsiteUtils {
steps = Seq(
Step.SingleStep(
name = "Git Checkout",
uses = Some(ActionRef("actions/checkout@v3.1.0")),
uses = Some(ActionRef("actions/checkout@v3.2.0")),
parameters = Map(
"ref" -> "${{ github.head_ref }}".asJson,
"fetch-depth" -> "0".asJson
Expand Down Expand Up @@ -264,8 +264,7 @@ object WebsiteUtils {
|
|I will automatically update the README.md file whenever there is new change for README.md, e.g.
| - After each release, I will update the version in the installation section.
| - After any changes to the "docs/index.md" file, I will update the README.md file accordingly.
|""".stripMargin.asJson
| - After any changes to the "docs/index.md" file, I will update the README.md file accordingly.""".stripMargin.asJson
)
)
)
Expand Down

0 comments on commit 77ad5c5

Please sign in to comment.