Update Fork #2
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
# Copyright (c) 2024 Niclas Heinz <[email protected]> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to | |
# deal in the Software without restriction, including without limitation the | |
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
# sell copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in | |
# all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | |
# IN THE SOFTWARE. | |
name: Update Fork | |
on: | |
schedule: | |
- cron: '59 23 * * *' # Runs daily at 23:59 | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
merge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Fork Repository | |
uses: actions/checkout@v3 | |
with: | |
repository: niclasheinz/mkdocs-material | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: master # The branch in your fork to update | |
- name: Setup SSH Key | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_PRIVATE }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts | |
env: | |
SSH_PRIVATE: ${{ secrets.SSH_PRIVATE }} | |
- name: Merge Updates from Upstream | |
run: | | |
git remote add upstream [email protected]:squidfunk/mkdocs-material.git | |
git fetch upstream | |
git merge --no-edit upstream/master | |
git push origin master |