diff --git a/.github/workflows/scraper.yml b/.github/workflows/scraper.yml index 5e1160d..aacb502 100644 --- a/.github/workflows/scraper.yml +++ b/.github/workflows/scraper.yml @@ -8,8 +8,6 @@ jobs: scrape-data: name: Scrape data runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Checkout scraping repo uses: actions/checkout@v3 @@ -25,7 +23,7 @@ jobs: - name: Clone Quatalog data uses: actions/checkout@v3 with: - repository: quatalog/quatalog-data + repository: quatalog/data path: quatalog-data token: ${{ secrets.PUSH_TOKEN }} @@ -43,6 +41,37 @@ jobs: CURRENT_TERM="$(grep quatalog-data/terms_list.json -e 'current_term' | cut -f4 -d '"')" rsync -avz "quacs-data/semester_data/$CURRENT_TERM/catalog.json" quatalog-data/catalog.json + - name: List files + run: | + ls -lsaR . + + - name: Upload data to artifact + uses: actions/upload-artifact@v3 + with: + name: quatalog-data + path: quatalog-data/ + + +# generate-site: +# runs-on: ubuntu-latest +# needs: [scrape-data] +# steps: +# - name: Checkout scraping repo +# uses: actions/checkout@v3 +# with: +# path: quatalog-scraping + + push-new-data: + name: Push new data to data repo + runs-on: ubuntu-latest + needs: [scrape-data] + steps: + - name: Download data from artifact + uses: actions/download-artifact@v3 + with: + name: quatalog-data + path: quatalog-data + - name: Push new data working-directory: ./quatalog-data run: | @@ -51,5 +80,3 @@ jobs: git add terms_offered.json prerequisites.json terms_list.json catalog.json git commit -m "$(date)" || exit 0 git push - - diff --git a/bin/CourseOfferingsScraper b/bin/CourseOfferingsScraper index ea234b1..62cccd4 100755 Binary files a/bin/CourseOfferingsScraper and b/bin/CourseOfferingsScraper differ diff --git a/bin/GenerateHtml b/bin/GenerateHtml new file mode 100755 index 0000000..bbbabb9 Binary files /dev/null and b/bin/GenerateHtml differ diff --git a/bin/json.o b/bin/json.o index 832cf80..8c3e582 100644 Binary files a/bin/json.o and b/bin/json.o differ