Skip to content

Commit

Permalink
ops: created deploy using github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rootCircle committed Oct 18, 2023
1 parent 22dccbb commit 3fd0aa1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/redploy-to-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Redeploy Backend to ensure that zen package is up-to-date!

on:
push:
branches:
- main
workflow_dispatch:

jobs:
dispatch:
runs-on: ubuntu-latest
steps:
# - run: |
# curl -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
# -H "Accept: application/vnd.github.everest-preview+json" \
# -H "Content-Type: application/json" \
# https://api.github.com/repos/docker-sstc/docker-notify/actions/workflows/main.yml/dispatches \
# --data '{"ref": "master"}'
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.PAT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'zenlang-rs',
repo: 'backend',
workflow_id: 'deploy.yml',
ref: 'main'
})
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zen"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// Just returns the same code as Ok!
/// TODO implement later
pub fn compile(code: String) -> Result<String, String> {
pub fn compile(mut code: String) -> Result<String, String> {
code.push_str("\nBhag yha se!!");
Ok(code)
}

0 comments on commit 3fd0aa1

Please sign in to comment.