-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Huaqi Fang <[email protected]>
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 5 ] ; then | ||
echo "HELP: $0 <user> <password> <server> <local> <remote>" | ||
exit 1 | ||
fi | ||
|
||
FTPUSER=$1 | ||
FTPPWD=$2 | ||
FTPSERVER=$3 | ||
LOCAL=$4 | ||
REMOTE=$5 | ||
|
||
if [ ! -d "$LOCAL" ] ; then | ||
echo "Local directory doesn't exist, please check!" | ||
exit 1 | ||
fi | ||
|
||
echo "Start deploy local $LOCAL to remote $REMOTE" | ||
|
||
lftp -u$FTPUSER,$FTPPWD $FTPSERVER \ | ||
-e "set net:timeout 5; set net:max-retries 2; \ | ||
set net:reconnect-interval-base 3; \ | ||
mirror --parallel=2 -p -e -R $LOCAL $REMOTE ; bye" |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build Documentation | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build_deploy: | ||
name: Build documentation | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Install Dependencies on Ubuntu | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install lftp python3 make latexmk \ | ||
texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended | ||
sudo python3 -m pip install --upgrade pip | ||
sudo pip3 install -r requirements.txt | ||
- name: Build Documentation | ||
run: | | ||
make all | ||
make latexpdf | ||
cp build/latex/*.pdf build/html/ | ||
- name: Deploy Documentation | ||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }} | ||
env: | ||
FTPUSER: ${{ secrets.FTPUSER }} | ||
FTPPWD: ${{ secrets.FTPPWD }} | ||
FTPSERVER: ${{ secrets.FTPSERVER }} | ||
run: | | ||
bash .github/ftp_deploy.sh $FTPUSER $FTPPWD $FTPSERVER build/html nuclei_tools | ||
- name: Upload Documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
# Artifact name | ||
name: nuclei_tools_doc | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: build/html |