-
Notifications
You must be signed in to change notification settings - Fork 0
Using GH actions to publish GH pages #1
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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: Publish Blog to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, hkt ] | ||
| paths: | ||
| - 'src/main/resources/blog/**' | ||
| - 'src/main/scala/blog/**' | ||
| - '.github/workflows/publish-blog.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup JDK | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
| cache: 'sbt' | ||
|
|
||
| - name: Install SBT | ||
| run: | | ||
| echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list | ||
| echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list | ||
| curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add | ||
| sudo apt-get update | ||
| sudo apt-get install -y sbt | ||
|
|
||
| - name: Build blog with SBT | ||
| run: sbt "runMain blog.BlogExpanded buildBlog" | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v4 | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: './src/main/resources/blog_out_v2' | ||
|
|
||
| deploy: | ||
| 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@v4 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,190 +1,19 @@ | ||
| # Created by https://www.toptal.com/developers/gitignore/api/scala,sbt,metals,intellij,java,maven | ||
| # Edit at https://www.toptal.com/developers/gitignore?templates=scala,sbt,metals,intellij,java,maven | ||
| .idea | ||
| .fleet | ||
| .bloop | ||
| .bsp | ||
| .vscode | ||
| .eclipse | ||
| .metals | ||
| .scala | ||
|
|
||
| ### Intellij ### | ||
| # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | ||
| # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
|
||
| # User-specific stuff | ||
| .idea/**/workspace.xml | ||
| .idea/**/tasks.xml | ||
| .idea/**/usage.statistics.xml | ||
| .idea/**/dictionaries | ||
| .idea/**/shelf | ||
|
|
||
| # AWS User-specific | ||
| .idea/**/aws.xml | ||
|
|
||
| # Generated files | ||
| .idea/**/contentModel.xml | ||
|
|
||
| # Sensitive or high-churn files | ||
| .idea/**/dataSources/ | ||
| .idea/**/dataSources.ids | ||
| .idea/**/dataSources.local.xml | ||
| .idea/**/sqlDataSources.xml | ||
| .idea/**/dynamic.xml | ||
| .idea/**/uiDesigner.xml | ||
| .idea/**/dbnavigator.xml | ||
|
|
||
| # Gradle | ||
| .idea/**/gradle.xml | ||
| .idea/**/libraries | ||
|
|
||
| # Gradle and Maven with auto-import | ||
| # When using Gradle or Maven with auto-import, you should exclude module files, | ||
| # since they will be recreated, and may cause churn. Uncomment if using | ||
| # auto-import. | ||
| # .idea/artifacts | ||
| # .idea/compiler.xml | ||
| # .idea/jarRepositories.xml | ||
| # .idea/modules.xml | ||
| # .idea/*.iml | ||
| # .idea/modules | ||
| # *.iml | ||
| # *.ipr | ||
|
|
||
| # CMake | ||
| cmake-build-*/ | ||
|
|
||
| # Mongo Explorer plugin | ||
| .idea/**/mongoSettings.xml | ||
|
|
||
| # File-based project format | ||
| *.iws | ||
|
|
||
| # IntelliJ | ||
| out/ | ||
|
|
||
| # mpeltonen/sbt-idea plugin | ||
| .idea_modules/ | ||
|
|
||
| # JIRA plugin | ||
| atlassian-ide-plugin.xml | ||
|
|
||
| # Cursive Clojure plugin | ||
| .idea/replstate.xml | ||
|
|
||
| # SonarLint plugin | ||
| .idea/sonarlint/ | ||
|
|
||
| # Crashlytics plugin (for Android Studio and IntelliJ) | ||
| com_crashlytics_export_strings.xml | ||
| crashlytics.properties | ||
| crashlytics-build.properties | ||
| fabric.properties | ||
|
|
||
| # Editor-based Rest Client | ||
| .idea/httpRequests | ||
|
|
||
| # Android studio 3.1+ serialized cache file | ||
| .idea/caches/build_file_checksums.ser | ||
|
|
||
| ### Intellij Patch ### | ||
| # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 | ||
|
|
||
| # *.iml | ||
| # modules.xml | ||
| # .idea/misc.xml | ||
| # *.ipr | ||
|
|
||
| # Sonarlint plugin | ||
| # https://plugins.jetbrains.com/plugin/7973-sonarlint | ||
| .idea/**/sonarlint/ | ||
|
|
||
| # SonarQube Plugin | ||
| # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin | ||
| .idea/**/sonarIssues.xml | ||
|
|
||
| # Markdown Navigator plugin | ||
| # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced | ||
| .idea/**/markdown-navigator.xml | ||
| .idea/**/markdown-navigator-enh.xml | ||
| .idea/**/markdown-navigator/ | ||
|
|
||
| # Cache file creation bug | ||
| # See https://youtrack.jetbrains.com/issue/JBR-2257 | ||
| .idea/$CACHE_FILE$ | ||
|
|
||
| # CodeStream plugin | ||
| # https://plugins.jetbrains.com/plugin/12206-codestream | ||
| .idea/codestream.xml | ||
|
|
||
| # Azure Toolkit for IntelliJ plugin | ||
| # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij | ||
| .idea/**/azureSettings.xml | ||
| target/ | ||
| logs | ||
|
|
||
| ### Java ### | ||
| # Compiled class file | ||
| *.class | ||
|
|
||
| # Log file | ||
| *.log | ||
| *.args | ||
| *.iml | ||
| metals.sbt | ||
|
|
||
| # BlueJ files | ||
| *.ctxt | ||
|
|
||
| # Mobile Tools for Java (J2ME) | ||
| .mtj.tmp/ | ||
|
|
||
| # Package Files # | ||
| *.jar | ||
| *.war | ||
| *.nar | ||
| *.ear | ||
| *.zip | ||
| *.tar.gz | ||
| *.rar | ||
|
|
||
| # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
| hs_err_pid* | ||
| replay_pid* | ||
|
|
||
| ### Maven ### | ||
| target/ | ||
| pom.xml.tag | ||
| pom.xml.releaseBackup | ||
| pom.xml.versionsBackup | ||
| pom.xml.next | ||
| release.properties | ||
| dependency-reduced-pom.xml | ||
| buildNumber.properties | ||
| .mvn/timing.properties | ||
| # https://github.com/takari/maven-wrapper#usage-without-binary-jar | ||
| .mvn/wrapper/maven-wrapper.jar | ||
|
|
||
| # Eclipse m2e generated files | ||
| # Eclipse Core | ||
| .project | ||
| # JDT-specific (Eclipse Java Development Tools) | ||
| .classpath | ||
|
|
||
| ### Metals ### | ||
| .metals/ | ||
| .bloop/ | ||
| project/**/metals.sbt | ||
|
|
||
| ### SBT ### | ||
| # Simple Build Tool | ||
| # http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control | ||
|
|
||
| dist/* | ||
| lib_managed/ | ||
| src_managed/ | ||
| project/boot/ | ||
| project/plugins/project/ | ||
| .history | ||
| .cache | ||
| .lib/ | ||
|
|
||
| ### SBT Patch ### | ||
| .bsp/ | ||
|
|
||
| ### Scala ### | ||
|
|
||
| # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
|
|
||
| # End of https://www.toptal.com/developers/gitignore/api/scala,sbt,metals,intellij,java,maven | ||
|
|
||
| *.jpg | ||
| .idea/ | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,22 @@ | ||
| version = "3.5.9" | ||
| runner.dialect = scala3 | ||
|
|
||
| align.preset = more | ||
| maxColumn = 120 | ||
| runner.dialect = scala3 | ||
| project.git = true | ||
| align.preset = more | ||
|
|
||
| align.tokens = [ | ||
daniel-ciocirlan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "=>", "->", "<-", ":=", "//", "%", "%%", "%%%", "+=", | ||
| { | ||
| "code" = "=", | ||
| "owners" = [{ regex = ".*" }] | ||
| }, | ||
| { | ||
| "code" = ":", | ||
| "owners" = [{ regex = ".*" }] | ||
| }, | ||
| { | ||
| "code" = "=>" | ||
| "owners" = [{ regex = "(Importee.Rename|Case)" }] | ||
| } | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think GH Pages needs a fake .nojekyll file or something like that, for the workflow to run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, I configured the GH pages to be deployed from GH actions. You can see the builds/actions kicked off on push but deploy fails because you can deploy only from master. So, if you are okay to merge this PR, you can see the pages live (once the push to master triggers the action).