diff --git a/.github/workflows/timedupdate.yml b/.github/workflows/timedupdate.yml index b0f0297..fcb86e9 100644 --- a/.github/workflows/timedupdate.yml +++ b/.github/workflows/timedupdate.yml @@ -13,34 +13,42 @@ jobs: TimedUpdate: runs-on: [ubuntu-latest] steps: - - name: Clone the main repository + - name: Checkout Main Repo + uses: actions/checkout@v4 + with: + repository: 9fans/plan9port + path: ~/plan9 + - name: Checkout this Repo + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + path: ~/web + - name: Install Dependecy run: | - cd /usr/local - sudo git clone https://github.com/9fans/plan9port.git plan9 - cd plan9 - - name: Install build deps + sudo apt-get update + sudo apt-get install build-essential xorg-dev + - name: Compile Plan9port run: | - sudo apt update - sudo apt install build-essential xorg-dev - - name: Build p9p - run: | - cd /usr/local/plan9 + cd ~/plan9 sudo ./INSTALL - - uses: actions/checkout@v4 - - name: Clone the website repository - run: | - cd ~ - git clone https://github.com/9fans/plan9port.git - - name: Update the website + - name: Update Web run: | - cd ~/9fans.github.io - cp -r /usr/local/plan9/man . - cp -r ~/plan9port . - - name: Commit and push + cd ~/web + cp -r /user/local/plan9 ~/web/user/local/ + cp -r /user/local/plan9/dist ~/web/plan9port + cp -r /user/local/plan9/man ~/web/plan9port + cp -r /user/local/plan9/unix ~/web/unix + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: web + path: ~/web + retention-days: 1 + compression-level: 0 + - name: Commit and Push run: | - cd ~/9fans.github.io git config --global user.email "aelnosu@gmail.com" - git config --global user.name "Automated Update (via actions)" + git config --global user.name "Eason Lu (Automated, Github Actions)" git add . - git commit -m "Automated update" - git push + git commit -m "Automated Update" + git push \ No newline at end of file