Files
spearhead/.github/workflows/docs.yml
T
2024-09-24 10:34:40 +02:00

52 lines
1.3 KiB
YAML

#start
name: update newsletters
on:
push:
branches:
- main
jobs:
pushdoc:
name: push_file
runs-on: ubuntu-latest
env:
branch: main
username: dutchie032
repo: dutchie032.github.io
sourcefile: DOC.md
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
with:
path: './spearhead'
- name: ls
run: ls
- name: Setup credentials to access private repositories
run: git config --global url.https://${{ secrets.API_TOKEN_GITHUB }}@github.com/.insteadOf https://github.com/
- name: Git Config
run: git config --global user.email "automated@action.com"
- name: Git Config
run: git config --global user.name "automated action"
- name: clone
run: git clone --single-branch --branch $branch https://github.com/$username/$repo
- name: ls
run: ls
- name: mkdir
run: mkdir -p ./$repo/Spearhead
- name: copy file
run: cp ./spearhead/$sourcefile ./$repo/Spearhead/$sourcefile
- name: ls
run: ls
working-directory: ./dutchie032.github.io
- name: add
run: git add --a
working-directory: ./dutchie032.github.io
- name: commit
run: git commit -a -m "Automatic Update of Spearhead README"
working-directory: ./dutchie032.github.io
- name: push
run: git push
working-directory: ./dutchie032.github.io