diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..eaacab3 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,20 @@ +on: + push: + branches: + - main + +jobs: + pull: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Install SSH Keys + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts + - name: Connect and Pull + run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "export PATH="${{ secrets.CARGO_PATH }}:$PATH" && cd ${{ secrets.WORK_DIR }} && git checkout ${{ secrets.MAIN_BRANCH }} && git pull --rebase && dx build --release && cp -r ${{ secrets.ARTIFACT_DIR }} ${{ secrets.DEPLOY_PATH }} && rm -rf ${{ secrets.DEPLOY_PATH }}/personality && mv ${{ secrets.DEPLOY_PATH }}/public ${{ secrets.DEPLOY_PATH }}/personality" + + - name: Cleaning + run: rm -rf ~/.ssh diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml deleted file mode 100644 index bfae90d..0000000 --- a/.woodpecker/deploy.yaml +++ /dev/null @@ -1,32 +0,0 @@ -when: - event: - - push - - manual - branch: main - -steps: - build: - image: rust - environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE_KEY - SSH_USER: - from_secret: SSH_USER - SSH_HOST: - from_secret: SSH_HOST - CARGO_PATH: - from_secret: CARGO_PATH - WORK_DIR: - from_secret: WORK_DIR - MAIN_BRANCH: - from_secret: MAIN_BRANCH - ARTIFACT_DIR: - from_secret: ARTIFACT_DIR - DEPLOY_PATH: - from_secret: DEPLOY_PATH - commands: - - mkdir -p ~/.ssh - - echo "$${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa - - ssh-keyscan -H $${SSH_HOST} > ~/.ssh/known_hosts - - ssh $${SSH_USER}@$${SSH_HOST} "export PATH="$${CARGO_PATH}:$PATH" && cd $${WORK_DIR} && git checkout $${MAIN_BRANCH} && git pull --rebase && dx bundle --release && cp -r $${ARTIFACT_DIR} $${DEPLOY_PATH} && rm -rf $${DEPLOY_PATH}/personality && mv $${DEPLOY_PATH}/public $${DEPLOY_PATH}/personality" - - rm -rf ~/.ssh diff --git a/README.md b/README.md index 091fd61..7de505f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -# personality + personality My personal website -[![status-badge](https://ci.codeberg.org/api/badges/14212/status.svg)](https://ci.codeberg.org/repos/14212) - +[![.github/workflows/deploy.yaml](https://github.com/Tahinli/personality/actions/workflows/deploy.yaml/badge.svg)](https://github.com/Tahinli/personality/actions/workflows/deploy.yaml) diff --git a/src/projects.rs b/src/projects.rs index 1560b5a..49eb399 100644 --- a/src/projects.rs +++ b/src/projects.rs @@ -151,7 +151,7 @@ pub fn Project(id: i32) -> Element { h3 {"Why I did this ?"} div { " - I wanted to learn how can I build package manager since I use them everyday. + I wanted to learn how can I build package manager since I use them everyday.g " } @@ -168,7 +168,7 @@ pub fn Project(id: i32) -> Element { class:"project", h1 {"Personality"} h5 {"Personal website written in Rust"} - Link {id: "codeberg_link_in_project_page", to: "https://codeberg.org/Tahinli/personality", "Codeberg"} + Link {id: "github_link_in_project_page", to: "https://github.com/Tahinli/personality", "GitHub"} div { " In this project I wanted to build portfolio website for myself and currently you're viewing what is built. @@ -308,7 +308,7 @@ pub fn Project(id: i32) -> Element { class:"project", h1 {"Voice Chat"} h5 {"Voice Chat written in Rust."} - Link {id: "codeberg_link_in_project_page", to: "https://codeberg.org/Tahinli/rust_voice_chat", "Codeberg"} + Link {id: "github_link_in_project_page", to: "https://github.com/Tahinli/rust_voice_chat", "GitHub"} div { " In this project I wanted to implement voice chat with QUIC protocol. @@ -332,7 +332,7 @@ pub fn Project(id: i32) -> Element { class:"project", h1 {"WebRTC"} h5 {"WebRTC Voice Chat written in Rust."} - Link {id: "source_link_in_project_page", to: "https://source.tahinli.com/Tahinli/rust_webrtc", "Source"} + Link {id: "github_link_in_project_page", to: "https://github.com/Tahinli/rust_webrtc", "GitHub"} div { " In this project I wanted to implement voice chat with WebRTC. @@ -356,7 +356,7 @@ pub fn Project(id: i32) -> Element { class:"project", h1 {"Voice Chat Room"} h5 {"Voice chat room written in Rust."} - Link {id: "source_link_in_project_page", to: "https://source.tahinli.com/Tahinli/rust_voice_chat_room", "Source"} + Link {id: "github_link_in_project_page", to: "https://github.com/Tahinli/rust_voice_chat_room", "GitHub"} div { " In this project I wanted to implement voice chat room for real-time audio communication with low latency audio processing.