-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
15 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,9 @@ jobs: | |
node-version: '16' | ||
- name: Build | ||
run: | | ||
echo "dev.plannable.org" > public/CNAME | ||
. ./scripts/ci_common.sh | ||
npx electron-builder --linux | ||
echo "dev.plannable.org" > public/CNAME | ||
. ./scripts/pre_deploy.sh | ||
- name: dev deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,6 @@ jobs: | |
run: | | ||
. ./scripts/ci_common.sh | ||
npx electron-builder --linux | ||
. ./scripts/pre_deploy.sh | ||
- name: dev deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,17 @@ | ||
# Scripts | ||
|
||
The scripts in this directory are used to deploy our website on both our primary address (https://plannable.org) and our mirror (https://plannable.gitee.io) in China. To operate such a mirror, we basically have to mirror the resources that are located in the U.S., among which the two important ones are the website itself and the course catalog. Normally, there is no need for you to understand or modify these scripts, nor should you execute them directly. | ||
The scripts in this directory are used to deploy our website to our primary address (https://plannable.org) and our development website (https://dev.plannable.org). Normally, there is no need for you to understand or modify these scripts, nor should you execute them directly. | ||
|
||
If you want to update the data in scripts, make sure that you're in the project root, and run `npm run updatedata`. | ||
If you want to update the data folder in scripts, make sure that you're in the project root, and run `npm run updatedata`. | ||
|
||
## File Descriptions | ||
|
||
### deploy.sh | ||
### ci_common.sh | ||
|
||
This file gets executed by the Travis CI when we push new commit to the repository. It will run tests, compile our website, and build documentation. Moreover, if the new commit is on the master branch, it will push the website and documentation built to [awesome-schedule.github.io](https://github.com/awesome-schedule/awesome-schedule.github.io) repository. | ||
This file gets executed by GitHub Action when we push new commit to the repository. It will run tests, compile our website, and build documentation. Moreover, if the new commit is on the dev branch, it will deploy the website to https://dev.plannable.org. If new commit is on the master branch, it will deploy the website to https://plannable.org. | ||
|
||
### data_loader.ts | ||
|
||
The data loader can update the catalog of the latest 5 semesters by simply downloading the `csv` files from Lou's list, and it executes [auto_update.sh](./auto_update.sh) once per hour. | ||
The data loader can update the catalog of the latest 5 semesters by simply downloading the `csv` files from Lou's list, and it executes [auto_update.sh](./auto_update.sh) once per hour to push data to https://github.com/awesome-schedule/data. | ||
|
||
It will also download the index page of Lou's list for getting the list of semesters. | ||
|
||
### auto_update.sh | ||
|
||
The execution of this file requires push access to https://github.com/awesome-schedule/data and https://gitee.com/plannable/plannable. | ||
|
||
This is a bash script that does the following | ||
|
||
1. pull the latest website built from the [awesome-schedule.github.io](https://github.com/awesome-schedule/awesome-schedule.github.io) repository. | ||
2. Remove the existing `.git` directory in `data` and initialize a git repo | ||
3. stage, commit all files and force-push to https://github.com/awesome-schedule/data | ||
4. create an empty directory called `deploy` | ||
5. copy `data` and `awesome-schedule.github.io` into deploy | ||
6. initialize a git repo in deploy | ||
7. stage, commit all files and force-push to https://gitee.com/plannable/plannable, which is the repository for the website in China | ||
|
||
The reason for force-push is that the data files are large and it may be inappropriate to keep the file history, as it will grow fairly quickly. However, this may change in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.