diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..78a59c4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "master" + schedule: + interval: "daily" + commit-message: + prefix: "👷 gh-actions" + labels: + - "dependencies" + - package-ecosystem: "gitsubmodule" + directory: "/" + target-branch: "master" + schedule: + interval: "daily" + allow: + - dependency-name: "themes/hextra" + commit-message: + prefix: "🎨 Theme" + labels: + - "dependencies" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 89d0790..1e1456a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,6 +2,8 @@ name: Deploy on: [workflow_dispatch] +permissions: + contents: read jobs: deploy: name: Deploy @@ -10,9 +12,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive + persist-credentials: false - name: Install Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@v3 with: hugo-version: '0.147.8' @@ -28,9 +33,6 @@ jobs: - name: Build run: | - #sudo apt update - #sudo apt install -y git - git submodule update --init hugo --minify cd public; tar czf x * scp x ${{ secrets.NAME }}@${{ secrets.HOST }}:/tmp/ diff --git a/README.md b/README.md index e96c5ae..e493702 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,40 @@ [**Preview**](https://rustdesk.com/docs/) -Install [hugo](https://gohugo.io/getting-started/installing/) +## Preview and build at local -The clone this repo -`git clone https://github.com/rustdesk/doc.rustdesk.com.git` +1. Install [Hugo](https://gohugo.io/installation) -Change to this folder: +2. Clone the repo, if you want to submit changes, please [Fork](https://github.com/rustdesk/doc.rustdesk.com/fork) and clone your fork. -`cd docs.rustdesk.com` - -Then run the following commands: +```sh +git clone --recursive https://github.com/rustdesk/doc.rustdesk.com.git ``` -hugo new site quickstart -cd quickstart -git init -git clone https://github.com/matcornic/hugo-theme-learn themes/hugo-theme-learn -echo "theme = 'hugo-theme-learn'" >> hugo.toml + +3. Change to the folder: + +```sh +cd docs.rustdesk.com +``` + +4. Start Hugo Server + +```sh hugo server ``` -Make any changes and then reupload. +If you found any bugs, stop the server and delete `public` folder and run again. + +You could make changes and than push and create PR. + +## Update branch/fork + +Sync your fork at GitHub UI or create new branch that points to upstream. + +Make sure you've checkout to right branch, and run: + +```sh +git pull --recurse-submodules +``` + +If you're cloned from here, just run the command.