38 lines
1.0 KiB
YAML
38 lines
1.0 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
|
|
- 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: Push generated webpage to another repository
|
|
run: git clone --single-branch --branch $branch https://github.com/$username/$repo
|
|
- name: mkdir
|
|
run: mkdir -p ./$repo/Spearhead
|
|
- name: copy file
|
|
run: cp ./$sourcefile ./$repo/Spearhead/$sourcefile
|
|
- name: copy file
|
|
run: cd ./$repo
|
|
- name: commit
|
|
run: git commit -a -m "Automatic Update of Spearhead README" |