diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4e8d69d..022bcac 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,40 +1,22 @@ -name: Build Hugo Site +name: Deploy + on: push: branches: - main jobs: - build: - runs-on: self-hosted - container: - image: hugomods/hugo:debian-nightly - + deploy: + runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - - - name: Install deploy deps - run: | - apt-get update - apt-get install -y rsync openssh-client + - uses: actions/checkout@v3 - name: Build - run: hugo --minify + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' - name: Deploy run: | - mkdir -p /root/.ssh - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 600 /root/.ssh/id_ed25519 - rsync -avz --delete \ - -e "ssh -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=no" \ - public/ ${SSH_USER}@${SSH_HOST}:${DEPLOY_PATH} - env: - SSH_KEY: ${{ secrets.SSH_KEY }} - SSH_USER: ${{ secrets.SSH_USER }} - SSH_HOST: ${{ secrets.SSH_HOST }} - DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }} - + rm -rf /web/personal/* + cp -r public/* /web/personal/ diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..5bc1a6a --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ +# Hello + +This is my site. diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..241e257 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,3 @@ +baseURL = "https://caio.wakamatsu.cc" +languageCode = "en-us" +title = "Caio's Corner" diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..95c78f1 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,9 @@ + + + + {{ .Site.Title }} + + + {{ .Content }} + +