Merge pull request #9 from andreped/snapshot-fix #16
This file contains 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
name: website-screenshot | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Screenshot website | |
uses: swinton/screenshot-website@v1.x | |
with: | |
source: https://raidionics.github.io/ | |
destination: screenshot.png | |
- name: Download artifact | |
uses: dawidd6/action-download-artifact@v2 | |
continue-on-error: false | |
with: | |
github_token: ${{secrets.CI_TOKEN}} | |
workflow: website-screenshot.yml | |
workflow_conclusion: "" | |
branch: master | |
event: push | |
name: screenshot | |
repo: raidionics/raidionics.github.io | |
search_artifacts: true | |
- name: Update screenshot in release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_name: raidionics/raidionics.github.io | |
repo_token: ${{ secrets.CI_TOKEN }} | |
file: ${{github.workspace}}/screenshot.png | |
asset_name: screenshot.png | |
file_glob: true | |
tag: screenshot-website | |
overwrite: true |