README.md #31
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
| # Simple workflow for deploying static content to GitHub Pages | |
| name: README.md | |
| on: | |
| # Runs on pushes | |
| push: | |
| # and run on a schedule | |
| schedule: | |
| # for those that don't speak cron, this runs: | |
| # * At the first minute (`1`) | |
| # * Every 23rd hour (`1/23`) | |
| # * Every day of the year (`* * *`) | |
| - cron: '1 1/23 * * *' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: "README.md.ps1" | |
| # set the shell to pwsh | |
| shell: pwsh | |
| # and then call any script we would like to build the page. | |
| # By default, this can use the same name as the workflow | |
| # (in this case, just deploy.ps1) | |
| run: | | |
| $readme = ./README.md.ps1 | |
| $readme > ./README.md | |
| $readmeFile = Get-Item ./README.md | |
| $readmeFile | Out-Host | |
| git add $readmeFile.Fullname | |
| $profileFile = New-Item -ItemType File -Path "./profile/README.md" -Force -Value ( | |
| $readme -join [Environment]::Newline | |
| ) | |
| $profileFile | Out-Host | |
| git add $profileFile.Fullname | |
| git config user.name "StartAutomating" | |
| git config user.email "1043665+StartAutomating@users.noreply.github.com" | |
| git commit -m "Updating README" | |
| git push | |
| $lastExitCode = 0 |