mirror of
https://github.com/Brandon-Rozek/website-toots.git
synced 2025-10-09 01:11:12 +00:00
Rust implementation
TODO: Make sure that JSON file writes are equivalent for less commit noise
This commit is contained in:
parent
d0571cfc2a
commit
bc01b85f87
7 changed files with 1989 additions and 7 deletions
22
.github/workflows/refresh.yml
vendored
22
.github/workflows/refresh.yml
vendored
|
@ -5,15 +5,12 @@ on:
|
|||
schedule:
|
||||
- cron: "12 23 * * *"
|
||||
|
||||
#concurrency:
|
||||
# cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
build_and_sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -25,9 +22,20 @@ jobs:
|
|||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
|
||||
- name: Grab latest toots
|
||||
- name: Install Rust
|
||||
run: |
|
||||
./.scripts/refreshtoots.py
|
||||
sudo apt update
|
||||
sudo apt install -y rustc cargo
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd .scripts
|
||||
cargo build --release
|
||||
|
||||
- name: Retrieve toots
|
||||
run: |
|
||||
cd .scripts
|
||||
./target/release/retrieve_toots
|
||||
|
||||
- name: Check if there's any changes
|
||||
id: verify_diff
|
||||
|
@ -37,6 +45,6 @@ jobs:
|
|||
- name: Commit and push
|
||||
if: steps.verify_diff.outputs.changed == 'true'
|
||||
run: |
|
||||
git add *.md
|
||||
git add .data
|
||||
git commit -m "New/Modified Toots"
|
||||
git push origin main
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue