-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (35 loc) · 1.04 KB
/
update-github-page.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This is a basic workflow to help you get started with Actions
name: Update Github Page
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
paths:
- "README.md"
- "docs/_config.yml"
- ".github/workflows/update-github-page.yml"
- "banner.svg"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- name: Create local changes
run: |
rm docs/index.md
cp README.md docs/index.md
cp banner.svg docs/banner.svg
- name: Commit files
run: |
git config --local user.email "weiss@nerd-labor.de"
git config --local user.name "Sebastian Weiß"
git add -A
git commit -am "Update github page" || echo "Nothing to update"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}